How to Remove TOC Leader Lines and Page Numbers for Selected Levels in Word
Question details
The user needs to format a Table of Contents so that Heading 1 entries omit tab leader lines and page numbers, while Heading 2 entries retain them.

- Product
- Microsoft Word 2019
- Device & OS
- not provided
- Scenario
- Customizing the appearance of a Table of Contents for a professional document to highlight primary chapters without page clutter.
- Observed behavior
- By default, all TOC levels display tab leader lines and page numbers. The user needs a targeted method to selectively disable these elements for specific heading levels.
Ensure your document headings are properly styled using built-in heading styles (Heading 1, Heading 2, etc.) and that your initial Table of Contents is already inserted into the document.
Remove Leader Lines Using TOC Styles
Modify the specific TOC style to remove the tab leader line for a targeted heading level.
Table of Contents formatting is controlled by specific styles (TOC 1, TOC 2, etc.). By editing the tab stops within the TOC 1 style, you can remove the dotted leader line exclusively for Heading 1 entries.
Navigate to the 'References' tab on the ribbon, click 'Table of Contents', and select 'Custom Table of Contents' from the dropdown menu.
In the Table of Contents dialog, click the 'Modify' button. Select 'TOC 1' (which corresponds to Heading 1) from the list and click 'Modify' again.
In the Modify Style dialog, click the 'Format' button in the bottom left corner and select 'Tabs'. Locate the tab stop associated with your page number alignment (usually a right-aligned tab at the margin).
Under the 'Leader' section, select the '1 None' option. Click 'OK' to close all dialog boxes. When prompted to replace the existing Table of Contents, click 'Yes'.

Suppress Page Numbers via TOC Field Switches
Edit the TOC field code directly using the \n switch to hide page numbers for selected heading levels.
Customize Table of Contents Easily with WPS Writer
WPS Office provides an intuitive, visual interface for managing Table of Contents formatting. You can easily modify TOC styles, adjust leader lines, and toggle page number settings without needing to memorize or edit complex field codes.
- 1. Insert Table of Contents: Open your document in WPS Writer, navigate to the 'References' tab, click 'Table of Contents', and select 'Insert Table of Contents'.
- 2. Customize the Layout: In the setup window, you can instantly change the 'Tab leader' dropdown to 'None' or uncheck 'Show page numbers'.
- 3. Modify Specific Levels: Click the 'Options' or 'Modify' buttons to assign specific formatting rules to individual heading levels, streamlining the customization process.

Frequently Asked Questions
Why are my page numbers still showing after changing the TOC style?
Page numbers in Word's Table of Contents are controlled by the TOC field codes, not just the paragraph styles. To hide page numbers for a specific level, you must use the \n switch (e.g., \n "1-1") directly in the field code.
What does the \n switch do in a Word TOC field?
The \n switch omits page numbers from the Table of Contents. By adding range numbers after it, such as "1-1", you specify that page numbers should be hidden only for level 1 headings, while retaining them for all other levels.
Can I hide the page number but keep the dotted leader line?
Standard TOC settings usually tie the leader line directly to the placement of the page number at the right-aligned tab stop. If you hide the page number using the \n switch, the leader line typically disappears as well because there is no character at the end of the line to tab over to.
How do I ensure my formatting stays after updating the TOC?
Make sure you apply your visual changes to the built-in TOC styles (TOC 1, TOC 2, etc.) rather than manually highlighting and formatting the text. Modifications made to the TOC styles and field codes are permanently saved and will persist when you select 'Update entire table'.




