Table of Contents Formatting Issue

Jay Dunn 30 Reputation points
2026-06-02T16:26:05.9933333+00:00

I am a fairly experience Word user but this one has me stumped. I have inherited a document that needs reformatting. The table of contents looks terrible but I have developed a VBA macro to reformat it and other things in the document. After running the macro, the TOC didn't change. I then highlighted it and did a manual reformatting and it still didn't change. I then went into the Reverences/TOC/Custom TOC tab and looked at the dialog for each TOC level. For example, the TOC 2 description shows it not to be in bold and yet it is in bold. I set the paragraph indent to 0.25 and yet it is still left justified. Why is this happening?

Microsoft 365 and Office | Word | For business | Windows
0 comments No comments

Answer accepted by question author
Chris Duong 10,705 Reputation points Microsoft External Staff Moderator
2026-06-02T17:40:35.3466667+00:00

Hi @Jay Dunn, 

Good day, and thank you for reaching out. I appreciate you sharing the details of your situation. 

Based on what you described, I would recommend first checking whether the Table of Contents in the document is an automatic TOC or a manual table. In Word, a manual table does not pull from Heading styles and cannot be updated automatically in the same way as an automatic TOC.  

If the document is using an automatic TOC, another likely cause is that the headings in the main body of the document may have manual/direct formatting applied from the Home tab (for example, bold, font, or paragraph formatting applied manually rather than controlled only by the heading style). When that happens, Word can carry that direct formatting into the TOC entries, which may cause the TOC to appear different from the TOC style settings shown in the dialog box.  

To help narrow this down, could you please check the following: 

  • First, check whether the current TOC is automatic or manual. If it was inserted as a Manual Table, Word will not rebuild it automatically from the document headings.  
  • Next, review the source headings in the document. If any heading has direct formatting applied from the Home tab (such as bold, font, or paragraph settings), that formatting can carry into the TOC. In that case, clear the manual formatting and reapply only the built-in Heading style. 
  • User's image

Please understand that our initial reply may not always immediately resolve the issue. However, with your help and more detailed information, we can work together to find a solution.   

I hope this information is helpful. Should you have any further questions or need additional assistance, please feel free to share them in the comment below. I'm very happy to help.  

I'm looking forward to hearing your thoughts.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. 

Note: Follow the steps in our documentation to enable email notifications if you want to receive email notifications related to this topic.     

Was this answer helpful?

3 people found this answer helpful.

2 additional answers

Sort by: Oldest
  1. AI answer

    2026-06-02T16:26:39.91+00:00

    The most likely cause is that the table of contents is still using its existing TOC styles (TOC 1, TOC 2, etc.) and/or a predefined TOC format, and the changes are not being applied to those styles in the way Word expects.

    To reliably change how a TOC looks, the formatting must be applied through the TOC’s styles and format settings, not by directly formatting the TOC text:

    1. Open the TOC customization dialog:
      • Go to References > Table of Contents > Custom table of contents.
    2. Ensure the TOC is based on the template and that page/indent settings are controlled there:
      • In the Custom table of contents dialog, adjust options such as showing/hiding page numbers, tab leaders, and levels.
    3. Modify the TOC styles directly:
      • In the same Custom table of contents dialog, select Modify.
      • If Modify is grayed out, change Formats to From template.
      • In the Styles list, select TOC 2 (or the level in question) and then select Modify.
      • In the Modify Style pane, remove Bold and set the desired paragraph indents (for example, left indent 0.25"), then select OK.
      • Repeat for other TOC levels as needed.
    4. Update the TOC after changing styles:
      • Click OK in the Custom table of contents dialog.
      • When prompted, allow Word to replace/update the existing TOC.

    If the macro is changing formatting directly on the TOC text (rather than modifying the TOC styles or the TablesOfContents object), Word will overwrite those direct changes whenever the TOC is updated. For programmatic control, use the TablesOfContents object and its Format property (which takes a WdTocFormat value such as wdTOCClassic, wdTOCModern, etc.), and/or modify the TOC styles (TOC 1, TOC 2, etc.) in code.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. Stefan Blom 353.7K Reputation points MVP Volunteer Moderator
    2026-06-02T20:33:18.7466667+00:00

    In Word, the appearance of items in the TOC is controlled by the TOC 1, TOC 2, etc. built-in styles.

    Also, I suspect that it is relevant which type of macro you are using to manipulate the TOC. Could you show us the code?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.