Word: Fixing a Table of Contents

September 11, 2009

Sometimes Word just won’t behave…

The problem

Recently I had a client’s Table of Contents (TOC) that got broken somehow (this is in Word 2003). If you look at the screen shot below you can see that there are two places where it is broken — section ‘9.3 Performance Standards…. 141’ is split over two lines, as is section ‘10.0 Implementation’ on page 146. There were a lot more than this, but these will do as the examples.

Broken TOC where heading and page numbers are on different lines

Broken TOC where heading and page numbers are on different lines

What I tried

I’ve had this before and have usually been able to fix it by doing Ctrl+click on the page number to go the heading that isn’t behaving, pressing Enter a few times at the beginning of the text for that section, creating a new heading with the same text on one of the new lines, applying the appropriate heading style, then deleting the old heading and any excess lines, then updating the TOC. Well, that worked for some of the Heading 3 level headings, but I just couldn’t fix the Heading 1 and 2 levels this way. They were broken.

So I tried several other strategies, none of which worked (e.g. reapply the style to the heading, reinsert the TOC from scratch, use the Organizer to copy across the original heading styles from the template, reassign the template to the doc, etc.).

What worked

What did work was a suggestion from my colleague, Susan Mc. She asked if I’d tried adding new lines ABOVE and BELOW the heading, re-creating the heading above the existing one, then removing all the excess lines and the heading that was misbehaving. I’d been adding the new lines below the heading, so I tried her suggestion — and it worked!

My TOC was back in order and I was happy, and my client was happy too!

However, this solution, while it worked, threw up another problem…

What can go wrong

If any of the headings you replace are cross-referenced within the document, they will become ‘0’ or ‘1.x’ or perhaps Error! Reference source not found’ cross-references — as shown below:


How to find these broken cross-references

Typically you’ll have a word in front of them that you can use to narrow down the search. Let’s use the example above — the incorrect reference is ‘Section 0’. So you need to do a Find (Ctrl+F) and look for ‘section 0’ (without the quotes).

How to fix these broken cross-references

For broken cross-references with a number like ‘0’ (as in the example above) or ‘1.x’, then Ctrl+click on the number and you’ll get taken to where Word thinks the heading is. Somehow Word remembers where the now-deleted heading was, so Ctrl+click takes you to where the new one is. But Word doesn’t know this new heading should be the cross-reference, so you need to reassign it. That’s easy — it’s a bit time-consuming, but it’s easy as you know where it *should* refer to.

However, if you have ‘Error! Reference source not found’ instead of the cross-reference, then you’ll have to figure out what it’s meant to refer to by the context of the text surrounding it, and then reassign it. Not so easy, especially if you’re the editor and not the author.

Other clues

Other clues I had that things might not be right with the headings in this document were the Document Map (View > Document Map) and the Cross-reference dialog box. Here’s part of the Document Map — those blank numbered items are a BIG clue!

Document Map has blank lines where there should be headings

Document Map has blank lines where there should be headings

And in the Cross-reference dialog (Insert > Reference > Cross-reference), I had all these extra 1.x’s for the ‘blank’ Headings:

Cross-reference headings are incorrectly listed as 1.1

Cross-reference headings are incorrectly listed as 1.1

What caused it in the first place?

I still don’t know what caused this document to get corrupt headings. I had only worked on it a few weeks earlier and it was fine then. However, it went to several authors after that and they added and deleted a lot of information, including copying and pasting an entire section from another document, WITHOUT pasting it as unformatted text. I suspect that’s where the problem occurred — somehow the styles got screwed up (technical term!), and even though they looked fine in the main body of the document, they obviously weren’t right when it came to the document’s structure.

(Update September 2010: I had a similar problem with a Word 2007 document and suspected that Track Changes might be the cause. So I copied the original document and accepted all Track Changes on the copy. When I updated the TOC, everything was back where it should be. It’s likely that Track Changes is the culprit, though I’m sure it’s not helped by people just copy/pasting from other docs.)

I think what I did is a quick fix only, and at some point this entire 200 page document will need to be copied over (using unformatted text!) to a clean template. I hope not — it adds about 4 to 8 hours to my editing process. The copy/paste as unformatted text and reassignment of heading styles is the easy part — reconstructing the many tables and cross-references is the painful part, as is setting up all the section breaks and headers and footers for the various page layouts (these documents have lots of Landscape and A3 pages).

It could all be avoided with the authors taking a little more time and care when they paste in text from another document — even one using the same template. Paste unformatted avoids so many of these conflicting style issues…

See also:

[Links last checked August 2009; thanks to Susan Mc who suggested adding new lines in front of the headings]


  1. Many thanks to you and Susan Mc. for these suggestions! I’ve battled with this often, and I do agree that it comes from multiple authors pasting in formatted text.
    Best Wishes for a relatively deadline-free time if/when you have to it over to a clean template!

  2. When text from a Word document is pasted into another Word document, all the styles are added to the second document along with the text. This will cause all kinds of severe and unforseen problems for the owner, as well as hours of “fixing.”

    It’s difficult to warn other contributers to past as unformatted text because the concept of “styles” formatting is not even known to most people.

    There is only one way to avoid allowing styles from other documents to get into your Word document that requires multiple contributers:
    1. Keep the orginal document hidden on the hard drive where no one can find it.
    2. Have the contributers send you their text changes in emails or as attachments. (When they ask to “see” the latest revision, send them a copy of your own latest revision. Tell them to yellow highlight their changes.
    3. Enter the changes yourself as unformatted text.

    That’s how I created a 219-page “Policies and Procedures” document that included a styles-generated Table of Contents, footnotes, etc.

    30% of the document was created out of pieces of two dozen older Word documents and 70% was new material I wrote.

    I began by converting the older documents into ASCII text, pasting that into Word and “re-building” all formatting. After that, no one else got their hands on the original.

  3. Good advice, Bill. But not possible in this situation unfortunately.

  4. […] One for the Word users: how to fix a table of contents […]

  5. Dear Writers
    I have avoided this problem by locking the styles in a document (ver 2007) ..it’s much harder for your well meaning contributors to “rearrange” (ahem) your carefully crafted styles. Particularly when they *insist* on editing straight into a “version” then you have to cut and paste from that version into your latest version.

  6. Best advice! THANKS SO MUCH! Helped my problem with this completely!

  7. […] TOC entry splits over lines between section number and text: https://cybertext.wordpress.com/2009/09/11/word-fixing-a-table-of-contents/ […]

  8. A great document as far it went.

    (*) I have a similar problem that is driving me crazy!

    I followed the Word 2007 directions to create a Table of Contents (& watched 2 Videos on Youtube). Seemed easy enough.

    When I clicked to create the new TOC (Reference tab, then Table of Contents box) it slammed about 5 pages of heading 1s, 2s, 3s. & portions of paragraphs I had NEVER hilited. Its weird!

    I had ONLY hilited the 1st 10 chaps to try it, to see how it worked.

    Now I’m stuck with this humongous amount of data in the ‘memory’ of the Table of C, I can’t get rid of it. Everytime I try to work with it, try to ‘update’ it, it slams that 5 pages of junk back into my TOC.

    I’ve spent hours on the Web, clicking all over trying to find someone to connect with who can help me out of this ‘Nightmare’ . . ?

    I’d be grateful for any help.

    Cheers, Josh, in Orlando

  9. Referring to my previous comment, with the Table of Contents problem. If anyone knows a fix for this problem my email is

    I’d be ever so grateful for some assistance.

    cheers, Josh

  10. Hi Josh

    A table of contents will create itself from ALL the headings in a document, not just the selected section. If you want a TOC for just a section, then follow these steps: https://cybertext.wordpress.com/2011/03/04/word-adding-a-toc-for-a-section/

    As far as the extra paragraph text in the TOC goes, that’s typically a result of a heading style being applied to a paragraph. See this post for fixing it: https://cybertext.wordpress.com/2008/09/30/pictures-in-a-word-table-of-contents/ — you can Ctrl+click the offending text in the TOC to go directly to that paragraph to change its style. Update the TOC when you’re finished.


  11. I was just having the same issue in Word 2007 with my TOC. I am collecting inputs from multiple people, but I’m pretty sure I was careful to paste in as unformatted text. I do have track changes on. When I tried accepting all changes and rebuilding the TOC, things lined up correctly.

  12. In Word 2010, my Heading 3 issues would not repaired by above. What worked was simply adding a word or two to the heading text.

  13. Thank Gof for the advice I was save by the bell.

  14. Thanks for the fix, I had wasted 3 hours trying to figure out what was wrong.

  15. Damn you TRACK CHANGES!!! Been looking everywhere for a fix and this did the trick!

  16. OK – late addition to the discussion, but this was the first I encountered this today. Quick fox: switch off track changes, then accept all changes in the document. Update TOC and hey-presto, all fixed. hth someone else.

  17. I have a document where the TOC (manually created via {Reference-Add Text}) is now refusing to add new items. From thread above I think the problem is probably due to fact that I pasted in entries from another word document…..including formats.

    I have tried deleting the pages which were added, but this does not solve problem. Is there a way of fixing document without having to entirely start again (c90 pages so far)?


  18. Hi James

    I’ve never used Reference Add Text to create a TOC, so I can only suggest that you try updating the field (right click in the TOC then select update field).

    Is there a reason you’re not using the automatic TOC function in Word?


  19. I’ve come into a problem where my TOC 3 is separating the number heading from the text line when I convert to a PDF. Has anyone seen this issue? Is there a resolution?

  20. Thank you! The Track Changes tip was the one–duh!

  21. Thank you so much for the info! Solved our TOC issue immediately.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: