Share this Page URL

Fields > Table of contents - Pg. 43

How Word Works Figure 2-11. Choosing a field and field options Table of contents A table of contents is created using paragraphs in a document formatted with head- ing styles. After using the Tables Table of Contents command, Word goes through the document searching for all of the paragraphs that use Word's built-in heading styles (or any styles you specify), notes the page on which the text is found, and builds the table of contents. The list of headings is converted to a style configured in the Index and Tables dialog box, normally followed by a dot-leader tab that leads up to the page number. Edit the document after creating the table of contents and you can update the table by selecting it and pressing F9. Turn field codes on in the document and you'll see that the table of contents is represented by a single code that looks something like {·TOC·\o·"1-3"·\h·\z·}. This code builds a table of contents using options set by three switches. The \o switch tells Word to use outline headings instead of using paragraphs marked with special table of contents tags. The "1-3" part of the \o switch tells Word to use heading levels 1-3. The \h switch causes Word to create hyperlinks in the table of contents so that clicking an entry jumps to that part of the document. The \z switch tells Word to hide the page numbers in the table of contents when viewing the document in Web Layout view. Learn more about creating a table of contents in Chapter 7. The Word Document | 43