Create a Table of Contents
Create a TOC Using Built-In Heading Styles
The easiest way to create a TOC is to use built-in heading styles.
Mark TOC Entries
- Select the text (heading) that you want to appear in a TOC.
Click the Add Text button on the References tab and then select the required level (for example, if you want the selected text to be displayed as the main heading in the TOC, click Level 1, etc.). If you change your mind and decide not to include the selected text in the TOC, click Do Not Show in Table of Contents.
After you have applied levels in a newly created document once or if you have opened a document with specified TOC entires by using heading styles, the corresponding heading styles (Heading 1, Heading 2, etc.) are automatically added to the list of available styles accessed via the Styles page group. In this case you can mark TOC entries by choosing these heading styles.
Build a TOC
After you have specified all required TOC entries, everything is ready to generate a TOC.
- Click within the document where you want to insert a TOC.
In the Table of Contents group, click Table of Contents.
This will automatically generate a TOC that consists of entries marked by using heading styles.
If you click the Show All Field Codes button on the Mail Merge toolbar, you will see the TOC field code. By default, it is { TOC \h }. The \h switch inserts all TOC entires as hyperlinks.
Create a TOC Using Paragraph Outline Levels
If you wish to include some text in a TOC without changing the text appearance, you can use outline levels. Unlike heading styles, outline levels applied to text do not affect text formatting characteristics.
Mark TOC Entries
- Select the text that you wish to appear in the TOC.
- Right-click the selected text and choose Paragraph from the context menu. The Paragraph dialog will invoked.
In this dialog, use the Outline level combo box to specify the outline level for the selected text. If you change your mind and decide not to include the selected text to the TOC, click Body Text.
Build a TOC
After you have specified all required TOC entries, everything is ready to generate a TOC.
- Click within the document where you want to insert a TOC.
- Press CTRL+F9 to create an empty field wherein you can manually enter a field code to insert a TOC.
- In this field, write the { TOC \u } field code. Use the \u switch to include text marked with outline levels in the TOC.
- To show the result TOC, place the cursor in the TOC field, right-click it and select the Update Field item from the context menu, or click the Update Table button on the References tab.
Create a TOC Using Fields
Along with built-in heading styles and outline levels, there is another way to label text to include it in a TOC - via TC fields. Sometimes it can be quicker and easier to add TC fields to mark TOC entries, rather than format the document using heading styles or outline levels. TC fields can be also helpful if you want to capture a portion of a long heading that should not be entirely included in the TOC and include only that portion in the TOC. In addition, if your document needs two or more TOCs showing different entries, you can mark entries for a particular TOC using TC fields with an identifier, which is specific for each TOC.
Mark TOC Entries
- Click within a document where you want to add a TC field (for example, right below an abstract heading).
- Press CTRL+F9 to create an empty field wherein you can manually enter a field code (TC in this case) and set required switches.
Write the following.
{TC "Entry Text" \f A \l 1 }
This will add the "Entry Text" first-level item (the \l switch sets the level of the TC entry) to the TOC with an \f switch and the A identifier. The \f switch of the TC field is used to include the TC field in the corresponding TOC. A TC field identifier (A in this case) must exactly match the text in the argument of the TOC field's \f switch. For example, the {TOC \f A} table of contents will be created from TC fields like {TC "Entry Text" \f A}.
Note
TC fields display no result in the document. To view field codes, click Show All Field Codes on the Mail Merge tab.
Build a TOC
- Click within the document where you want to insert a TOC.
- Press CTRL+F9 to create an empty field wherein you can manually enter a field code to insert a TOC.
Write the following:
{TOC \f A}
The \f switch collects the TC field entries in the TOC. This switch's field-argument (A in this case) specifies which TC fields should be included in the TOC (TC fields with the same identifier - A).
- To show the resulting TOC, place the cursor in the TOC field, right-click it and select the Update Field item from the context menu, or click the Update Table button on the References ribbon tab.