Written by Allen Wyatt (last updated May 30, 2024)
This tip applies to Word 2007, 2010, 2013, and 2016
Doreen wonders if information in headers or footers can be included in a table of contents and, if so, how to do it. She is not talking about having headers and footers appear on the same pages where the TOC appears; she knows how to do that. What she wants is for information that is placed in headers or footers to actually be a part of the TOC itself.
There are two ways you can approach this problem, depending on what you actually want included in the TOC. If you want the entire header or footer included, then the approach is rather straightforward:
Figure 1. The Table of Contents Options dialog box.
If you don't want the entire header or footer, but instead only want a portion of the text in that header or footer, then you can use TC fields to include extra information in the TOC. The idea is to bookmark whatever text you want included in the TOC, and then create a TC field that references that bookmark. Finally, when creating the TOC, simply indicate that you want TC fields included in what Word generates. Here are the actual steps:
{ TC {REF MyTOCText} \l 1}
The table of contents should now be generated, and it should include the information that you wanted from your header or footer. While the TC field you inserted may still be visible on the screen, it should not print.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (2698) applies to Microsoft Word 2007, 2010, 2013, and 2016.
Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!
Adding multiple tables of contents is a must for some types of document design. Here's a great overview of how you can ...
Discover MoreWord allows you to easily add a table of contents to your documents. If you find that some of your document headings ...
Discover MoreIf you generate a table of contents for your document, there may be some unexpected surprises in the way the TOC appears. ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-10-20 04:53:16
WarwickWr
What about including headings within Endnotes? I have some endnotes which are effectively Appendices, which include the same heading levels as in the bulk of te document. None of these appear in the TOC. Is it possible to make these appear in the TOC? Specifically, I have the standard Heading1, Heading2 and Heading3 making up the basis for the TOC. All three appar in the Endnotes but none of these apper in the TOC.
2019-10-04 10:29:08
Martin
I was kind of hoping that I could get this to work as there are times where I could use this. I am using the latest MS word frustration, what ever name that goes by today. I run into the same issue as Raymond where as soon as I started typing within the curly brackets they disappeared, never to return. And what is the character right after the slash anyway?
Ken mentioned an "f" switch in the TOC field which I did not have and adding it did not make any difference. This is what Alt F9 changes the Table of Contents field to: {TOC\o"1-3"\f \h \z \t "Header,4,Footer,4" } Not sure of the actual spacing, and I added the \f switch.
Considering that every comment here, other than those made by Ken, who seems to know how to do this already, were made in frustration I have to concur with Robert, this tip needs much better explanation.
2019-05-04 16:57:19
Robert Shields
This is an almost useless explanation! Without an illustrated example this non-pedagogic explanation is just a plain irritating waste of time. Mate, you seem to have no idea of how to illustrate a proper example. I doubt very much anyone who has tried to follow this has succeeded as it makes no sense to anyone who does not already know how to do it.
If you want to know how to structure a proper explanation, contact me.
2016-04-05 08:05:25
Ken Endacott
Click ALT+F9 to toggle between the display of fields including braces and the display of field results.
If you have a TOC then ALT+F9 will display the TOC field and you can check that the TOC field contains a f switch. Then ALT+F9 to display the TOC again.
2016-04-04 08:05:15
I am sorry, but method one does not work as described above in Word 2016. If I follow these steps, only body text that is marked with style 'Header' of 'Footer' is shown in the TOC. Actual headers of footers, which use these same styles, are not listed in the TOC (and that was the question, if I understood it correctly).
As for method 2: when I press CTRL+F9 at the top of my page, the braces appear indeed. When I start typing between the braces, the braces disappear, so I cannot position my cursor as described in step 5. This method needs some more clarification, because it will raise a lot of questions the way it is described now.
2016-03-22 12:33:05
Ken Endacott
In Word 2007 and 2010, method 1 does not work because TOC entries cannot come from headers or footer only from the document body.
I don't know if the same applies in Word 2013 and 2016
2016-03-21 06:44:08
Ken Endacott
The TC method uses nested fields ie one field inside another. A TC field has the format { TC "Text to display" l 1 } where "Text to display" will appear in the TOC at level 1. If a REF field that refers to bookmarked header of footer text is used instead of text then the REF field is evaluated first and the resultant text is then used by the TC field.
Note that fields require special curly brackets and not the curly brackets on your keyboard. CTRL/F9 generates a pair of field brackets.
The TC field must be located in the document body, its position determines where it appears in the TOC relative to other entries. For example a header TC field might be placed at the top of the first page that has headers. A footer TC field might be placed at the bottom of the last page.
To make TC fields appear in the TOC it is necessary to place a f switch in the TOC field. This can be achieved in the TOC menu as described in step 14 or it can be added manually to the TOC field. The TOC field should then look like:
{ TOC o "1-3" f h z u }
Incidentally, TC fields are also useful for such things as generating TOC entries that are abbreviated headings and sub headings.
2016-03-21 04:48:01
Richard
I need some help with this one as well. I'm using Word 2007 on Win7.
2016-03-20 15:45:16
Calvin Wilson
@ Alice Walton
I also tried both methods without success.
I entered text in the header and formatted it with the Header style as suggested. In the Table of Contents Options dialog box, I located the Header style (step 8) and set the TOC Level value to 1 so the formatted text would be a first level entry in the TOC.
I also formatted the text in the header as Heading 1.
The text in the header simply isn't recognized when the TOC is created.
I am using Word 2010.
2016-03-20 12:02:30
Alice Walton
I have tried both options and did not get any results. In the second option --using TC fields -- I noticed that in step 4. the field is {TC l 1}, but in the final field there are two ones
{ TC {REF MyTOCText} l 1}.
In the first option, where Allen states in the instructions to open the TOC Options dialog box, I am missing something here for step 8. Is Allen saying to scroll down to find header or footer and put the TOC level that you want associated with your headers or footers? This just does not work and I am totally baffled. Does anyone have any suggestions? Thank you, AW
2016-03-19 15:34:51
Penny Edwards
If you want a separate table of contents for a section, you will need to bookmark the section. Then using the TOC field, add the b option and enter the name of your bookmark. This will give you a TOC for the bookmarked section.
2016-03-19 10:32:33
John Cheek
I have a document with two sets of table of contents. One is at the beginning of the document, the other in a separate section halfway through the document. How do I set this up?
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments