You can have Word generate an index or a table of contents for your document. A comprehensive index and an accurate table of contents are important assets for a document, especially a lengthy or technical one.
TIP
Use a Table of Contents for a Web PageIf you're creating a Web-page document, you should use a table of contents rather than an index. The page numbers given in an index are meaningless in a Web page displayed in a browser, because the browser doesn't divide the document into separate pages. However, a table of contents displayed in a browser consists of a list of hyperlinks that the user can click to navigate to different parts of the document, and is therefore quite useful.
NOTE
If you have inserted captions using the Caption command on the Insert menu, you can have Word generate a table of figures. Also, you can have it generate a table of authorities for a legal brief. These sorts of tables aren't as common as indexes and tables of contents and aren't discussed in this book. For information, look up the following topics in the Word online Help: "captions," "tables of figures," and "tables of authorities."
Preparing an index in Word is a two-step process: First, you mark a series of index entries, and then you compile and insert the index based on these entries.
A typical index entry consists of the name of a topic followed by the number of the page on which the topic is discussed:
When you mark an index entry, you specify the topic name, and you tag the location of the topic in the document so that Word can determine the page number when you compile the index. To mark an index entry, do the following:
Otherwise, simply place the insertion point at the beginning of the document text that you want to index.
For example, typing the following into the Main Entry and Subentry boxes
would create the following index entry and subentry boxes:
NOTE
Rather than selecting the Current Page option, you can select the Cross-Reference option or the Page Range option. If you select Cross-Reference, the index entry will display the cross-reference that you type into the box, for example, " See herb teas," rather than a page number. If you select Page Range, the index entry will display the range of pages that are marked with the bookmark that you select in the Bookmark list. Bookmarks are discussed in "Marking and Retrieving Text Using Bookmarks"
TIP
If you want to mark as index entries all occurrences of text in your document that exactly match the contents of the Main Entry box, click the Mark All button rather than the Mark button.
NOTE
Word marks an index entry by inserting a block of instructions known as a field into the document. The field contains the XE code (for index entry), and it is formatted as hidden text. If you can't see it, you can make it appear by clicking the Show/Hide ¶ button on the Standard toolbar.
When you have marked all the index entries, the next step is to compile and insert the index itself. Do this as follows:
SEE ALSO
For general instructions on changing styles, see "Modifying Styles" For information on using the Style dialog box, see "Modifying Styles Using the Style Dialog Box"
Word creates the index and marks its location by inserting an INDEX field into the document. If you see the field code rather than the actual index, you can make the index appear by placing the insertion point within the field code and pressing Shift+F9. The field code will look something like this:
TIP
Customize Your Index EntriesTo create custom formatting for your index entries, choose the From Template item in the Formats list. Then click the Modify button to open the Style dialog box, which lets you modify the built-in styles that Word assigns to index entries. (It assigns Index 1 to main entries and Index 2 through Index 9 to subentries.) This dialog box is similar to the Style dialog box that opens when you choose Style from the Format menu, except that it lets you modify only the index entry styles. You can also change the formatting of index headings (that is, the A, B, and C headings, and so on, that precede each index section) by modifying the Index Heading built-in style.
You can also use Word to compile and insert a table of contents in your document. A table of contents lists the document headings. When you view a table of contents in any Word view except Web Layout, each entry typically includes the page number of the heading and functions as a hyperlink that you can click to navigate to that heading. When you view a table of contents in Web Layout view or when you view a Web-page document in a browser, each entry consists of only a hyperlink without a page number. (Page numbers would be meaningless in a browser, which doesn't divide a document into separate pages.)
The following is the easiest way to create a table of contents:
The Print Preview area shows how the table of contents will appear in any Word view except Web Layout, while the Web Preview area shows how it will look in Web Layout view or when a Web-page document is viewed in a browser. You can choose the table format, alignment of numbers, number of levels, and tab leader character. You can also add or remove page numbers.
TIP
Customize Your Table of ContentsTo create custom formatting for your table of contents, choose the From Template item in the Formats list box on the Table Of Contents tab. Then click the Modify button to open the Style dialog box, which lets you modify the built-in styles that Word assigns to table of contents entries (TOC 1 through TOC 9). This dialog box is similar to the Style dialog box that opens when you choose Style from the Format menu, except that it lets you modify only the table of contents styles.
Word creates a table of contents and marks its location by inserting a TOC field. If you see the field code rather than the table of contents, you can make the table of contents appear by choosing Options from the Tools menu, clicking the View tab, and deselecting the Field Codes option. (If that option was already disabled, you should be able to make the table of contents visible by placing the insertion point within the field code and pressing Shift+F9.) The field code will look something like this: