Posts Tagged ‘table of contents’


Word: Text surrounding a cross-reference shows in list of tables

September 7, 2022

One of my clients contacted me about some weirdness she was experiencing with some table cross-references (x-refs) in Word. Some table captions weren’t listed in the list of table at the beginning of the document—instead, the text surrounding the x-refs to these captions was listed. To explain this better, here’s what was showing in the list of tables (I’ve blurred out some text to preserve anonymity; click each image to view it larger): 

As you can see in the screenshot, the first instance of Table 10-10 reports the caption correctly, but the second one is in bold AND it shows 5 lines of the surrounding text AND other table numbers (x-refs) are mentioned in that text. Table 10-12 and Table 10-13 are both correct. This is not something I’ve ever seen before, as far as I know.

My first step was to click the link to that incorrect line item in the list of tables. I then reset the paragraph to the default style by selecting it and pressing Ctrl+spacebar, just in case there was an errant style that was causing the problem.

And then I noticed that while the first two x-refs (Table 10-10 and Table 10-11) in the text were both full fields (as evidenced by the grey shading, shown below; ignore the other grey for the blurring), the next x-ref for Table 10-11 wasn’t—only the section and table numbers had the grey shading that indicated they were fields, not the entire table number and the word ‘Table’, as you should see with a correct table x-ref. (As an aside, I always show field shading in a Word document as it shows me where the fields are and is thus a visual reminder NOT to touch them when writing or editing; in Word for Windows, you turn on field shading under File > Options > Advanced > Show Document Content — set Field Shading to Always.)

To confirm these were different types of fields, I right clicked on each and selected Toggle Field Codes. This confirmed that I was looking at quite different field types. Table and other x-refs should start with { Ref , which is what the first two showed, but the third one had different types of field codes, one for each number, as shown in the screenshot below.

And I recognised that the types of field codes for the incorrect one were the same field codes used in table captions, NOT table x-refs. (Don’t forget to right click in the fields again and select Toggle Field Codes to show them as they should be.)

I think I know how it happened—someone COPIED the table number part of a caption, pasted it and then restyled it like the surrounding text, thinking that was all they had to do to insert a x-ref. But of course, it isn’t a true x-ref—just a copy of the caption, which is why the sentence it was in was appearing in the list of tables.

The solution was to remove the incorrect text and fields and replace them with correctly inserted x-refs. Once I did this, I updated the list of tables and everything was fine again.

(Note: You may also have to update all the fields in the document too as it’s likely that the copied caption caused the other caption numbers to update and they are likely incorrect. In my case, I had to update the fields twice—once to get the caption numbering correct, then a second time to get the x-refs to those caption numbers correct. But typically you only need to update the fields once.)

See also:

And for solving other table of contents weirdness, see these blogs posts too:

[Links last checked September 2022]


Word to PDF: Table of Contents not clickable

May 6, 2022

One of my clients had a situation where the table of contents (TOC) in their Word document did not become a clickable (linked) TOC in the PDF they created from it. By default, it should. because the standard settings for clickable links in a PDF are to include the usual Heading styles from Word. They had used standard Heading styles, so there was no reason why they shouldn’t be linked. Other elements such as cross-references to sections, appendices, tables, and figures all worked fine in the PDF, but not the TOC entries.

I checked their TOC settings and there I found the reason and the solution. NOTE: You can’t open these TOC settings if you’ve inserted a default (Microsoft-supplied) TOC from the References tab—you must have inserted a custom TOC.

  1. Open the Table of Contents window (References tab > Table of Contents > Custom Table of Contents).
  2. Make sure the Use hyperlinks… checkbox is selected. This checkbox is selected by default, so if it’s been turned off at some point, turn it on.
  3. Click OK.

Now, create your PDF—the TOC in the PDF should now be clickable.

Update June 2022: For a full discussion of the different PDF outputs when you Save as or Print to PDF from Word, see this excellent article:


Word: Add more levels to a TOC

September 19, 2012

By default, Word inserts a Table of Contents (TOC) with three levels of headings. For most people, that’s usually more than enough. However, for very long complex reports, sometimes you need to report more levels — in the case of my client, the regulatory body they were reporting to needed to see five TOC levels. Or perhaps three levels is too many, and you need to just show the Heading 1s.

It’s easy enough to change the TOC levels, but there’s a good chance they won’t indent correctly below the other TOC levels if you’ve set up TOC 1, TOC 2 and TOC 3 styles to indent differently than the default.

Here are instructions for doing both.

Change the heading levels reported in the TOC

  1. Click anywhere inside the TOC.
  2. Go to the References tab > Table of Contents > Insert Table of Contents.
  3. On the Table of Contents window, change the Show levels setting from 3 to 4 or 5, depending on how deep you want to go. Change it to 1 or 2, if you want a much shorter TOC.
  4. Click OK.
  5. Say Yes to replace the existing TOC.

If you also have an automated List of Tables and/or List of Figures, the pagination for these will likely be incorrect as a result of increasing or decreasing the TOC levels, so update those two tables as well.

Modify the TOC 4 and TOC 5 styles

If you want your new TOC levels to be indented below the existing ones, then you may need to change some of the default settings for the TOC 4 and TOC 5 styles. These instructions assume you are comfortable with modifying a style. You’ll need to experiment a bit with the paragraph and indentation settings to get them right for you.

  1. Click anywhere inside the TOC.
  2. Go to the References tab > Table of Contents > Insert Table of Contents.
  3. Click the Modify button.
  4. Select the TOC level style you want to modify, then click the Modify button on the Style window.
  5. On the Modify Style window, clear the Automatically Update check box (optional), then click the Format button and select Paragraph.
  6. On the Paragraph window, consider changing any or all of these settings:
  7. If you need to change the tab settings, click the Tabs button and make the changes there (see
  8. Click OK several times to close these windows.
  9. Say Yes if you are asked to re-insert the TOC.
  10. Check that it’s all as you want — if not, repeat these steps changing the paragraph and tab settings until you get it looking how you want.

[Links last checked September 2012]


Word: TOC picks up Figure and Table captions and other oddities

September 14, 2012

I’ve seen normal text and images in an automated Table of Contents (TOC) and they’ve been easy to find and fix. Typically, a heading style has been applied to the paragraph containing the text or image, and thus it gets reported in the TOC where the TOC is set up to display text in several levels of headings. Changing the paragraph’s style back to a body text style then updating the TOC solves that problem.

However, a work colleague reported that the TOC in one of his documents was picking up some figure and table captions as well, plus some other weird stuff. I walked him through finding out what styles were applied to the paragraphs and all seemed to be OK (I work remotely, so all this was done over the phone). I also got him to re-insert the TOC — that didn’t work either. He said TOCs in other docs in the suite of docs that used the same template were working fine.

So he sent me links to two of the documents — one where the TOC was misbehaving and the other where it was working as it should.

I looked at the misbehaving TOC and there was nothing obvious I could see that was causing the problem.

However, I noticed a setting for Outline levels that was turned on in the Table of Contents Options window of the Table of Contents window (References tab > Table of Contents > Insert Table of Contents > Options button).

I wasn’t sure what it did, so I turned it off, re-inserted the TOC and voila! all the odd entries in the TOC disappeared and it was back to how it should be. My colleague was very happy.

The weird thing is that the other document, where the TOC worked fine, also had this setting turned on, but it wasn’t reporting these odd entries. I left the other document set as it was (‘If it ain’t broke, don’t fix it!’). I still don’t really know what that setting does and why it caused the TOC to misbehave in one doc where it was turned on, but not another that used the same template.

[Links last checked September 2012]


Fixing some table of contents update issues

June 20, 2012

(adapted from a ‘Writing Tip’ email I recently sent to work colleagues [Word 2007 environment])


Bottom line: Before releasing your document, turn off Track Changes then update the Table of Contents, List of Tables, and List of Figures so that they reflect the current headings, captions, and page numbers.

Some recent questions from my authors have related to updating the Table of Contents (TOC), List of Tables (LOT), and List of Figures (LOF), common things that can go wrong when doing so, and how to fix them.

1. Why does my Table of Contents look a mess?

In this example, the TOC entries are all in red and there’s a change bar to the right of the TOC. There’s also a deleted TOC below the inserted TOC. How did it get like this? You had Track Changes turned on when you updated the TOC.

To fix it, turn off Track Changes (Review tab), then update the TOC again (see below for how).

That’s it! Super easy with an immediate reduction in stress related to things going wrong with your document just before your deadline ;-)

2. Why aren’t the things I’ve added, changed or deleted reflected in the TOC/LOT/LOF?

The second issue relates to why the new tables/figures, sections etc. that you’ve added to the document aren’t appearing in the TOC/LOT/LOF, or why your changes or deletions aren’t reflected in the TOC/LOT/LOF. Typically, the reason is that you’ve forgotten to update the TOC/LOT/LOF – these lists don’t update automatically. There are several ways you can update these lists, but the safest way that seems to work properly every time, is to use the ‘Update Table’ buttons on the References tab in Word.

To update a TOC:

  1. Turn off Track Changes.
  2. Click anywhere inside the TOC.
  3. Go to the References tab.
  4. Go to the far left of that tab, and click the Update Table button in the Table of Contents group.
  5. If asked, select the option to Update entire table and click OK.

To update a LOT:

  1. Turn off Track Changes.
  2. Click anywhere inside the List of Tables.
  3. Go to the References tab.
  4. Go to the middle of that tab, and click the Update Table button in the Captions group.
  5. If asked, select the option to Update entire table and click OK.

To update a LOF: Same procedure as for updating a LOT, but for step 2, you click anywhere inside the List of Figures first.

3. Why aren’t all my tables/figures listed even though I’ve updated the lists using the methods above?

This issue invariably relates to Track Changes. If you’ve inserted or deleted a table or figure, then it’s possible that the table or figure caption won’t get listed in the LOT/LOF. Dealing with the table/figure Track Changes by accepting/rejecting them usually sorts this out. After accepting/rejecting the change, update the LOT/LOF and all should be well again. I haven’t found any other way of solving this one.

4. I get an ‘Error! Reference not found’ message in the TOC/LOT/LOF instead of a page number.

I’m not sure what causes this, but turning off Track Changes and updating the TOC/LOT/LOF should fix it.


Word: Sometimes a List of Tables/Figures just won’t update

March 28, 2012

I’ve had several documents recently where the List of Tables and/or List of Figures just won’t update to list all tables/figures in the document.

The captions are all applied correctly, and I’ve tried the various methods for updating the fields. I’ve even reinserted the List of Tables/Figures — all to no avail. Some tables/figures just don’t show in the lists.

I’ve suspected it was to do with track changes being on in the document, even though none of the captions or the paragraphs surrounding them were the subject of tracked changes. And I also suspected that something was happening with the field updating that can get messed up when track changes are on (see for how to fix that).

To confirm my suspicions, I copied a document that wouldn’t behave and put it into a testing area (so I wouldn’t mess up the original). I then accepted all track changes in the document and updated the List of Tables. It worked! All the tables that should have been listed originally were now listed correctly.

The problem is that the authors need to keep on track changes so that the regulators can see what’s changed in these docs, so they have three choices:

  • Accept all track changes (NOT an option for these docs)
  • Ignore the pesky List of Tables and hope that the reader doesn’t notice ;-)
  • Ignore the pesky List of Tables and make a note to the regulators that it will update correctly once all track changes are dealt with.

[Links last checked March 2012]


Word: Table of Contents articles revisited

September 14, 2011

I get a LOT of searches on this blog for articles on creating Tables of Contents (TOC) in Word, and fixing them when things go wrong. So I thought it might be useful to have a single post that links to all those articles in the one place.

Creating an automated Table of Contents

Modifying a Table of Contents

Fixing issues with a Table of Contents


Related posts about lists of tables and figures

[Links last checked March 2012]


Word: Highlight remains even after I’ve cleared it

May 13, 2011

Colette, a colleague of mine, had a problem with her Word 2007 document. She had highlighted some section headings for areas that she needed to finish, and those highlights showed up nicely in the Table of Contents (TOC) as a visual reminder.
Once she’d finished those sections, she removed the highlighting by selecting the highlighted text and pressing Delete.

However, the outline numbered heading was still highlighted: 

She then updated the TOC. But that heading ‘number’ (the Appendix number) remained highlighted in the TOC. She wanted to know why it was still there and how to fix it.

You will see this behavior with any numbered or bulleted list when you haven’t selected the paragraph mark at the time you cleared the highlighting. If you don’t have your paragraph marks showing, you have to select the entire paragraph (heading, list bullet, list number) and remove the highlighting.

If you do have your paragraph marks showing (and I recommend that you always have them turned on), then you can just select the paragraph mark (as shown below) and apply the ‘No Color’ highlighting. Even though the paragraph mark itself isn’t highlighted, that mark stores the highlighting inside it and this is what causes the auto number/bullet to remain highlighted.

Once you select the paragraph mark and clear the highlighting, it disappears from the auto number/bullet:

Now, update the TOC. Because my client’s template uses several ‘update field’ macros, sometimes right-clicking and selecting Update Field or pressing F9 just doesn’t update the TOC in our documents correctly, so I always show my colleagues this method as it always seems to work: Go to the References tab, then click Update Table in the Table of Contents group.

Make sure you select Update entire table, when asked:

And the highlighting will be gone!

[Links last checked May 2011]


Word: Adding a TOC for a section

March 4, 2011

If you have a very large Word document, with lots of chapters/sections and several levels of headings and subheadings, you might want to help your document’s readers by adding a ‘mini’ Table of Contents (TOC) in front of each section, just like the publishers of US textbooks have done for years.  These mini TOCs are in addition to the main TOC near the beginning of your document.

The steps that follow are written for Word 2010, but they work equally well for Word 2007. The same sort of mini TOC can also be inserted in a Word 2003 document, but the steps to insert a bookmark and insert a field are different.

There are two main steps:

  1. Insert a bookmark for the section you want to include in the mini TOC
  2. Insert a TOC field that references that bookmark in front of the section.

We’ll create a mini TOC for this section (Section 2):

Step 1: Insert a bookmark

  1. Select all the text in the section (this selection could cover several pages).
  2. Go to the Insert tab and select Bookmark.
  3. Give this bookmark a unique but meaningful name (I’ve called this one Section2), then click Add. NOTE: Bookmarks cannot have spaces.
  4. If you have the Show Bookmarks option turned on (and I suggest that you do), then you’ll see light gray square brackets around the bookmark.

Step 2: Insert a TOC field

Once you’ve set up your bookmark, you need to insert a TOC field in front of the section. Unlike the normal TOC at the beginning of your document that builds the TOC based on just heading levels, your mini TOC is built on the bookmark you defined AND the heading levels within that bookmark (at least, I *think* that’s what’s going on!).

  1. Go to a blank area in front of the section. Press Enter a couple of times to add some space for the mini TOC.
  2. Go to the Insert tab, click Quick Parts, then select Field.
  3. Select TOC from the list of field names on the left, then click the Field Codes button.
  4. Click the Options button at the bottom left of the Field window to open the Field Options window.
  5. On the Field Options window, select \b, then click Add to Field. Hint: If you want to know what each switch does, click on it and read its Description.
  6. Add a space after \b, then type the name of the bookmark you created earlier, then click OK. NOTE: The space after the \b is critical — without it, your TOC won’t work; however, your bookmark name should NOT have a space.
  7. The complete field code, with bookmark switch and the bookmark name you typed, is shown in the Advanced field properties text box on the Field window. Click OK.
  8. The mini TOC is inserted in front of the section heading:
  9. Optional: You can make this section stand out by adding a title for it. In this example, I just typed Section 2 on an empty line in front of the mini TOC, then styled it using Word 2010’s text effects (Home tab, Font group)


  • Repeat the steps above for all other sections where you want a mini TOC.
  • To update the mini TOC, put your cursor anywhere in it, then press F9 (or right-click anywhere in the mini TOC and select Update field).
  • If you want to create a fancy title for the mini TOC that reflects the Heading 1 of the section and you don’t want to repeat the Heading 1 in the mini TOC, then don’t select the Heading 1 when selecting the area for the bookmark.
  • Update 27 June 2014: If you PDF your document using the Acrobat add-in, you’ll have clickable links for the main TOC, but not for this mini one, so place your cursor at the beginning of the first line of the mini TOC, right-click, then edit the field for the mini TOC so it looks like this: TOC \o “1-3” \h \z \u \b Section2 (“1-3” tells the mini TOC to display heading levels 1 to 3, and the bookmark name will vary according to which bookmark applies to this mini TOC). Now, when you PDF the doc, the mini TOC will have clickable links.

[Links last checked February 2011]


Word: Getting a two-line heading onto one line in the Table of Contents

February 24, 2011

Larry had a problem. He had a heading on two lines, and he wanted the heading to display on a single line in the Table of Contents (TOC).

Here’s an example of what he had; both lines are styled with Heading 1:

Because each line is in a separate paragraph, Word treats them as two separate Heading 1s when it creates the automatic TOC:

What Larry wanted was for the two lines to remain in the body of the document but display on one line in the TOC.

Update September 2020: Make sure Track Changes is OFF.

The simplest solution to this is to use a ‘soft return’ (Shift+Enter) between the lines in the body of the document, instead of Enter. It looks like this (with formatting marks showing):

And when you update the TOC, you select Update entire table:

Your TOC now displays the text on one line:

Personally, I don’t like how the title butts up against the section label, so I added five spaces after ‘Section 3’ (I could have used a Tab):

This extra space makes the TOC more readable, in my opinion:

See also: A method to use Style Separator to show what you want to see in a TOC:

[Links last checked July 2021]