How to Stop Word Table of Contents from Including Heading 3
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.

- 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.
Ensure your document has heading styles properly applied to the text you want included in the Table of Contents before modifying field codes.
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.
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 }.
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.
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 }.
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.

Reinsert the TOC with Custom Heading Settings
If modifying field codes is too technical, you can completely replace the malfunctioning Table of Contents with custom level settings via the References menu.
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. Open document in WPS Writer: Launch WPS Office and open your .docx document containing the headings.
- 2. Navigate to the References tab: Click on the 'References' tab on the top ribbon and select the 'Table of Contents' button.
- 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. Generate the TOC: Click 'OK' to instantly generate a perfectly formatted Table of Contents that strictly pulls Heading 1 and Heading 2.

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.




