logo
search
Formatting Issues

How to Stop Word Table of Contents from Including Heading 3

Adam DavisAdam Davis Oct 10, 2026 869 views

Question details

The user needs to prevent a Word document's Table of Contents from displaying Heading 3 entries, as it continuously reverts to an older configuration.

How to Stop Word Table of Contents from Including Heading 3
Product
Word
Device & OS
not provided
Scenario
Updating or generating a Table of Contents in a document.
Observed behavior
When the Table of Contents is updated, it automatically pulls in and displays Heading 3 styles instead of limiting the output to Heading 1 and Heading 2.
Before you start

Ensure your document has heading styles properly applied to the text you want included in the Table of Contents before modifying field codes.

Solution 1Recommended

Edit the TOC Field Code to Limit Heading Levels

Directly editing the underlying field code is the most reliable way to force a Table of Contents to stop reverting and strictly restrict it to specific heading levels.

Sometimes modifying the settings through the standard interface fails to save, causing the Table of Contents to revert to a default 3-level format upon updating. By revealing and editing the field code manually, you can hardcode the precise outline levels you require.

1
Reveal field codes

Click anywhere inside the existing Table of Contents in your document. Press Alt+F9 (or Alt+Fn+F9 on some laptop keyboards) to display the underlying field codes. The TOC will turn into code that looks similar to { TOC \o "1-3" \h \u }.

2
Modify the heading range

Locate the portion of the instruction specifying the heading levels, which is usually \o "1-3". Change the "1-3" to "1-2" so it only pulls Heading 1 and Heading 2.

3
Remove conflicting switches

Delete the \u switch if it is present in the bracket, as this switch can sometimes force extra outline levels to appear unexpectedly. Your final code should look like { TOC \o "1-2" \h }.

4
Update the Table of Contents

Press Alt+F9 again to hide the field codes. Finally, press F9 (or right-click the TOC and select 'Update Field'), and choose to update the entire table.

Edit the TOC Field Code to Limit Heading Levels
Field Code Updated: The Table of Contents should now only display Heading 1 and Heading 2. It will maintain these parameters even after future manual updates.
Simplify Document Formatting

Create and Manage Table of Contents Easily in WPS Office

WPS Writer offers an intuitive interface to insert and customize your Table of Contents without the need to troubleshoot complex field codes. It handles heading structures flawlessly and ensures excellent compatibility with existing Microsoft Word documents.

  1. 1. Open document in WPS Writer: Launch WPS Office and open your .docx document containing the headings.
  2. 2. Navigate to the References tab: Click on the 'References' tab on the top ribbon and select the 'Table of Contents' button.
  3. 3. Set custom levels: Choose 'Insert Table of Contents' from the dropdown. In the setup window, simply change the 'Show levels' setting to 2.
  4. 4. Generate the TOC: Click 'OK' to instantly generate a perfectly formatted Table of Contents that strictly pulls Heading 1 and Heading 2.
Easily adjust TOC heading levels via a simple, user-friendly dialog box.Fully compatible with Microsoft Word (.docx) formats and field codes.Free, lightweight, and fast document processor.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Table of Contents keep reverting to include Heading 3?

This happens if the underlying field code for the TOC natively specifies generating up to level 3 (e.g., using the instruction \o "1-3"), or if a \u switch is forcing unformatted outline levels to be included. Editing the field code directly overwrites this automatic reversion.

What is the keyboard shortcut to view field codes in Word?

You can toggle field codes by selecting the text and pressing Alt+F9 on Windows. Depending on your laptop or computer's keyboard settings, you may need to hold down the Function key, resulting in Alt+Fn+F9.

How do I remove a single heading from the Table of Contents without changing global levels?

Highlight the specific heading text in your document, go to the 'References' tab, click 'Add Text', and select 'Do Not Show in Table of Contents'. Update the TOC afterward with F9.

Will these field code changes apply to all new Tables of Contents I create?

No, editing a field code only modifies the specific Table of Contents you have selected. If you insert a brand new TOC in a different document, it will revert to using standard default settings until customized.