Software

A crash course in building a table of contents in Word

Users who create long documents in Word could use some instruction on creating tables of contents. Learn how to create and customize tables of contents in Word and pass these tips on to your users.


When I wrote "Teach Word users the six benefits of a table of contents," I was making the point that good technical documents should always contain a table of contents. A number of TechRepublic members responded saying, “Hey, some of our users don't even know how to apply styles, much less how to use them to generate a table of contents!”

If you're someone who has used Word for years but never figured out how to generate a table of contents (TOC), consider this your crash course. I'll cover how to build multilevel tables of contents and how to customize the look of TOC entries in the body of the document and in the TOC itself. Just for fun, I'll explain how to change the page numbers between the title page, the introductory pages, and the body of the document so that the right page numbers appear in the TOC.

Nine basic Word skills required
To use Word to generate a TOC automatically, there are some Word fundamentals that you should understand completely:

1. Paragraph-level styles
This lesson will focus on how Word uses styles to generate a TOC. You determine whether and how any given paragraph appears in the TOC by the named style you apply to that paragraph.

2. The Style drop-down list
If you aren't already taking advantage of the Formatting toolbar, go to View | Toolbars and activate it. Its Style drop-down list makes it easy to change the style assigned to a paragraph.

3. The Style area
To display the styles assigned to the paragraphs in your document, go to Tools | Options | View and set the Style Area Width option to half an inch or so.

4. The Show/Hide button
You should be familiar with the Standard toolbar's Show/Hide button, which toggles between hiding and displaying unprintable characters, such as paragraph marks. Displaying the paragraph marks can help you troubleshoot TOC problems.

5. The Format painter
Located on the Standard toolbar, the Format painter tool needs only two mouse clicks to copy the paragraph-level style from one paragraph and "paint" that style onto another paragraph.

6. Headers and footers
By going to View | Header and Footer, you can specify information you want to appear on every page of your document, including static text and information that changes from page to page, such as the page number.

7. Section breaks
If you want to have different kinds of page numbers for sections in your documents, you need to understand section breaks. Go to Insert | Break and choose Next Page from the list of section break types. Doing so allows you to create a brand-new header and footer for the new section.

8. What does [F9] do to a field?
When you generate a table of contents, Word inserts a special field. When you change your document's pagination or if you add, delete, or change a TOC entry, you don't have to manually retype anything in the TOC. You update the TOC like you do any Word field: Select it and press [F9]. When you select a TOC and press [F9], Word will either update the TOC immediately or allow you to decide whether to update the whole TOC or just the page numbers.

9. What does [Alt][F9] do?
A common mistake made by beginning Word users is not noticing that Word is displaying fields instead of field results. If Word is displaying fields, it can appear as though your TOC has disappeared. Press [Alt][F9] to toggle between displaying fields and results.

Using the built-in heading styles
Three of Word's built-in styles, Heading 1, Heading 2, and Heading 3, are ideal for generating a TOC. To create a top-level chapter or section heading that you want to appear in the TOC, type the entry. Then, you have several ways to apply the Heading 1 style.

Start by clicking anywhere in the paragraph that contains the text you want to include in the TOC. You can go to Format | Style, click on Heading 1 in the Styles list, and then click Apply. In addition, you can display the Formatting toolbar, click on the Style drop-down list, and select a style from that list. Figure A shows the subtle differences in the appearance of the paragraphs formatted as Heading 1, Heading 2, and Heading 3.

Figure A
Notice the differences in Word's built-in heading styles in the body of the document. You can include some or all of those styles in your TOC.


After you've applied the appropriate heading styles to the items you want to appear in your TOC, the rest is a snap. Go to Insert | Index and Tables | Table of Contents, and click OK. Figure B shows the result in my sample document.

Figure B
I generated this TOC using the Classic TOC template.


Formatting headings in the text
Suppose you want to make changes in the appearance—in the paragraphs formatted as Heading 1, Heading 2, and Heading 3. One manual approach is to select one of those paragraphs, tweak the formatting to your liking, and then use the Format Painter to copy those new attributes to similar headings.

A better way is to go to Format | Style, click on the style you want to modify in the Styles list, and then click the Modify button. When the Modify Style dialog box appears, click the Format button and add, change, or remove attributes as you see fit. Then save your changes.

Customizing the TOC itself
If you don't like the way your TOC looks, change it. You can always select an existing TOC and reformat it in place. The problem with that approach is when inevitable late revisions cause changes in page numbers or TOC entries. When you select the table, press [F9], and update the entire table, you'll lose your custom formatting.

Here's how to have fun with different looks for your TOC. First, go to Insert | Index And Tables | Table Of Contents. In the General section, click on the Formats drop-down list. As Figure C shows, you can choose from a number of predefined TOC templates. As you select a template, Word provides a sneak preview of how it will be formatted.

Figure C
Word provides a number of built-in templates for your TOC.


Take a look at the bottom-right corner of Figure C and you'll notice a field labeled Show Levels. That's where you tell Word how many levels of headings you want to include in the TOC.

Customizing the TOC styles
You don't even have to settle for the way Word formats the individual items in your TOC. Go to Insert | Index And Tables | Table Of Contents, select the From template option in the Formats list, and then click the Modify button.

When the Style dialog box appears, select a style TOC 1 through TOC 9, and click the Modify button. The changes you make to this style definition will only affect your headings when they appear in the TOC. These changes don't affect the way the headings appear in your document.

Managing a style's TOC level
In spite of how easy it is to redefine the built-in styles, you're not limited to using Word's built-in headings to mark text to appear in the TOC. The attribute that determines whether and how any paragraph hits the TOC is its level.

To assign a level, go to go to Format | Style (as you would to make a cosmetic change), click on a name in the Styles list, and click Modify. Then, click the Format button, and choose Paragraph. Click the Indents And Spacing tab, and then select the appropriate level from the Outline level drop-down list. Your choices are Body Text (which doesn't hit the TOC), and levels 1 through 9.

Taking control of your page numbers
TechRepublic member MuniKat wanted to know how to change the document's page-numbering settings so that certain pages—the title page, the TOC page itself, and other miscellaneous pages—weren't counted in the document's running page numbers. That's an important issue when you're talking about creating an accurate TOC.

Basically, MuniKat's goal is to go to the first or second page of the body of the document, even if that's the fourth or fifth actual page of the document, and tell Word to start the page numbering at 1 or 2 instead of 4 or 5.

Here's how to accomplish that task. Go to where you want the new page numbering to start, and then go to Insert | Break | Next Page. Doing so inserts a hard page break that is also a section break.

Next, go to View | Header And Footer to display the header and footer for the new section. Click on the Format Page Number icon on the Header And Footer toolbar, as shown in Figure D.

Figure D
To change the current page number, start by clicking the Format Page Number icon.


When the Page Number Format dialog appears, select the radio button for the Start At option and enter the new page number, as shown in Figure E.

Figure E
Use this dialog to reset the page number for the current section in your Word document.


You say you want to use letters instead of numerals for the page numbers? Use that same dialog box to choose a different style for your page numbering. Figure F shows your options.

Figure F
You can choose from several predefined formats for your page numbers.


Only the beginning
I can't cover everything there is to know about generating a TOC in Word in one crash course, but I have discussed the essential skills you need to generate a standard or custom table of contents for your next writing project. In future columns, I'll look at some additional TOC options, including how to deal with numbered headings.

Add to the table of comments
To comment on this tip, or to share your favorite Word technique, post a comment or write to Jeff.

 

Editor's Picks