TROUBLE generating an automatic TOC with 107931 words
I have tried countless times to generation an automatic TOC, but unexplained codes, hyperlinks and sometimes the titles are generated also with the contents of that title. 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.
PLEASE HELP!!!
3 answers
-
Charles Kenyon 167.8K Reputation points • Volunteer Moderator
An Automatic Table of Contents will respond to styles and outline levels. The default is heading styles and outline levels 1-3. It will also include the contents from TC fields.
By default, each entry in the TOC will be a hyperlink to the information appearing. Try going to an unwanted entry in the TOC and Ctrl+Click on it to see what is there.
References:
- How to Create a Table of Contents by Shauna Kelly
- by Suzanne Barnhill, MVP
-
AI answer
Use Word’s built‑in heading styles and a standard automatic TOC; avoid manual TOC entries and mixed formatting, which cause the issues described.
- Prepare the document
- Turn on formatting marks so that hidden codes are visible:
- Select File > Options > Display.
- Select Show all formatting marks, then OK.
- Scroll through the document and remove any unwanted manual TOC text, extra page breaks, or stray hyperlinks that were created during earlier attempts.
- For each chapter or section title that should appear in the TOC, apply a built‑in heading style:
- Select the title text.
- On the Home tab, in Styles, choose Heading 1 for top‑level titles, Heading 2 for sub‑titles, etc.
- Ensure that body text (the content under each title) uses a non‑heading style (for example, Normal) so it does not appear in the TOC.
- Turn on formatting marks so that hidden codes are visible:
- Create an automatic TOC
- Place the cursor where the TOC should appear (usually near the beginning of the document).
- On the References tab, choose Table of Contents, then select one of the automatic TOC formats.
- Word will build the TOC from the heading styles. Only paragraphs with heading styles or an outline level of 1–3 (by default) will be included.
- Fix entries that show extra text or “codes”
- If a TOC entry shows both the title and some of its content, that means the content paragraph has a heading style or an outline level set:
- Click in the offending paragraph in the main document (not in the TOC).
- On the Home tab, change its style to Normal (or another non‑heading style).
- If needed, open Home > Paragraph > dialog launcher and set Outline level to Body Text.
- Update the TOC by clicking in it and pressing F9, then choosing Update entire table.
- If a TOC entry shows both the title and some of its content, that means the content paragraph has a heading style or an outline level set:
- Remove unwanted manual TOC fields (TC fields)
- With formatting marks visible, look for
TCfields near text that appears incorrectly in the TOC. They look like:-
{ TC "Some text" \f C }
-
- To remove them:
- Select the entire TC field, including the curly braces.
- Delete it.
- Update the TOC (click in TOC, press F9, choose Update entire table).
- If a TC field is needed but should not show a page number, recreate it using Insert > Quick Parts > Field as described in the referenced article.
- With formatting marks visible, look for
- Ensure the TOC stays in sync as pages change
- Do not use a manual TOC for a long, changing document.
- After editing content, always update the TOC:
- Click anywhere in the TOC.
- Press F9.
- Select Update entire table.
- If page numbers or entries still look wrong
- Check for extra page breaks or section breaks that may have been introduced, especially if the document was edited in Word for the web.
- Clean up those breaks in the desktop version of Word and then rebuild the TOC.
Following these steps ensures that only the intended headings appear in the automatic TOC, without stray codes, hyperlinks, or body text.
References:
- How to create table of contents entries without a page number in Word
- Add a Table of Contents to a Workbook
- Table of Contents Parser
- GetToc Function for Generating a Table of Contents
- MS Word constructs a table of contents with incorrect page number - Microsoft Q&A
- How can I add or code text items to show in the Table of Contents? - Microsoft Q&A
- Insert page numbers option does not work. All I get is a drop down screen with no sub-options on what page numbers to choose - Microsoft Q&A
- I have logged into 365, but I receive a prompt that says I must have admin permission to access office apps. I am the Admin and I do not know how to grant permission - Microsoft Q&A
- WORD file on desktop no longer remembers where I left off on start up. It only remembers for a minute or two. - Microsoft Q&A
- I have Outlook on Android with an Outlook.com or Microsoft 365 commercial email account, but why don't I still see the add-ins?
- Do I have to have the related app installed to use Add-Ins?
AI-generated content may be incorrect. Read our transparency notes for more information. - Prepare the document
-
Here are Microsoft's instructions ... https://support.microsoft.com/en-us/word/training/insert-a-table-of-contents
Please follow those instructions and alert us to the specific step in those instructions that's giving you trouble.
More help needed? No worries. You can use the results from a search with Bing:
how to create an automatic table of contents in word 365
Need a little handholding? Everyone does at one time or another. Here's how I used ChatGPT to answer your question:
