TOC repeated problem after many suggestion - cannot generate an auto TOC-PLS HELP!!!

Debbie Bodo 0 Reputation points
2026-06-19T19:53:43.58+00:00

I have tried countless times to generation an automatic TOC, but I get unexplained codes, hyperlinks. I called microsoft twice. The 2nd person suggested to created a manual TOC with hyperlinks to the titles, but pages change as the TOC get longer. I really want to generate an automatic TOC so I will be able to upload this document for digial reading and the TOC should be working automatically. I have made screen shot to give visual references. I even used headers in the pre-designated header styles and got the same result.

PLEASE HELP!!!

Microsoft 365 and Office | Word | Other | Windows

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-19T19:54:07.9666667+00:00

    To generate a working automatic table of contents (TOC) in Word and avoid the “codes” and unwanted hyperlinks, focus on three key areas: using built‑in heading styles, inserting the TOC correctly, and avoiding manual TOC workarounds.

    1. Use built‑in heading styles only
      • Apply Word’s built‑in Heading styles (Heading 1, Heading 2, Heading 3, etc.) to every title that should appear in the TOC.
      • Do not manually format headings or rely on custom styles unless the TOC is explicitly configured to include them.
      • By default, the automatic TOC includes:
        • Paragraphs in Heading 1, Heading 2, and Heading 3.
        • Any paragraphs with outline levels 1, 2, or 3.
      • If some text is appearing unexpectedly in the TOC, check that it does not have an outline level set to 1–3.
    2. Insert an automatic TOC (not manual)
      • Place the cursor where the TOC should appear.
      • Use References → Table of Contents → Automatic Table (not “Manual Table”).
      • This TOC will:
        • Show page numbers for headings.
        • Create hyperlinks from TOC entries to the corresponding headings.
      • The hyperlinks are expected behavior: in Word, holding CTRL and clicking a TOC entry jumps to that page. This is required for digital reading and does not prevent the TOC from working correctly.
    3. Understand and avoid “codes” in the TOC
      • If field codes are visible (for example, the TOC shows something like { TOC \o "1-3" \h \z \u } instead of the formatted entries), toggle field code display:
        • Press Alt+F9 to switch between field codes and field results.
      • Ensure the TOC is not being edited as plain text; always update it via right‑click → Update Field.
    4. Avoid manual TOC with hyperlinks for dynamic documents
      • A manual TOC with individually created hyperlinks will not update page numbers when content changes.
      • For documents that will grow or be used digitally, rely on the automatic TOC so that:
        • Page numbers update via Update Field.
        • Hyperlinks remain correct as headings move.
    5. Control what appears in the TOC
      • If additional text needs to appear in the TOC, ensure it uses a style or outline level that the TOC is configured to include.
      • The TOC can be customized to include other styles and outline levels, but by default it uses Heading 1–3 and outline levels 1–3.
    6. If page numbers or entries are wrong
      • Confirm there are no extra page breaks or section breaks that shift content unexpectedly.
      • If the document was created or heavily edited in Word for the web, open it in the desktop version of Word and rebuild the TOC there, as some users have reported more reliable TOC behavior in the desktop app.
    7. Update the TOC after edits
      • Whenever headings or page layout change:
        • Right‑click the TOC → Update Field → choose Update entire table.
      • This keeps both page numbers and hyperlinks in sync with the document.

    References:

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

    Was this answer helpful?