Restore Table of Contents Dot Leaders in Microsoft Word
Question details
Restore consistent dot leaders in a Word table of contents using styles from a template or VBA.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A document uses TOC styles from a template, but it may be edited when the template macros are unavailable.
- Observed behavior
- Dot leaders can disappear or become inconsistent, and reattaching the template does not always refresh the document's TOC styles.
Open the document and confirm that the template contains the TOC styles with the desired dot leaders. Save the document and check which TOC levels it uses, such as TOC 1, TOC 2, and TOC 3.
Import the TOC styles from the Word template
Use the Organizer to replace the document's TOC styles with the configured styles from the template, without relying on a macro.
In Word, open the document, select the dialog launcher in Home > Styles, and choose Manage Styles > Import/Export.
In the Organizer, use Close File and then Open File on one side to select the template containing the configured TOC styles. Make sure the document is open on the other side.
On the template side, select TOC 1, TOC 2, and any other TOC levels the document uses. Select Copy toward the document and confirm replacement if prompted.
Close the Organizer, click the table of contents, and choose Update Table. Select Update entire table, then save the document.

Copy the template's TOC styles with a VBA macro
Use VBA to import the styles and update the table without selecting the entire table of contents.
Work with Word documents in WPS Writer
WPS Writer is a free, lightweight Office alternative with a familiar interface for editing documents and working with tables of contents. It supports Word formats to help you move existing files into WPS, but it does not repair Microsoft Word's template or VBA behavior.

Frequently Asked Questions
Why did my table of contents dot leaders disappear?
The document's TOC styles may no longer have the expected tab and leader settings. Because those styles are stored in the document, editing without the template macros can leave their formatting inconsistent.
Does reattaching the template restore the TOC styles?
Not necessarily. Use Home > Styles > Manage Styles > Import/Export to copy the configured TOC styles from the template into the document.
Do I need to select the whole table of contents in VBA?
No. A macro can use Application.OrganizerCopy to import the TOC styles and then update each table through the document's TablesOfContents collection.
What if I use more than three TOC levels?
Copy every TOC style used by the document. In the VBA example, change the loop's upper limit from 3 to the highest required level, and ensure those styles exist in the attached template.




