Microsoft KB Archive/211791

= HOW TO: Create Multiple Tables of Contents in One Document in Word 2000 =

Article ID: 211791

Article Last Modified on 10/27/2002

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q211791



For a Microsoft Word 98 version of this article, see 181614.

For a Microsoft Word 97 version of this article, see 181617.

For a Microsoft Word 6x version of this article, see 181615.

IN THIS TASK
SUMMARY If You Use Standard Heading Styles If You Use Custom Heading Styles If You Use TC Fields
 * Step 1: Mark the Text with TC Fields
 * Step 2: Create the Table of Contents Using the TC Fields

If You Use a Combination of Heading Styles and TC Fields REFERENCES



SUMMARY
This step-by-step article describes how to create multiple tables of contents in a Word document.

Use the method that is appropriate for your situation.

back to the top

If You Use Standard Heading Styles
NOTE: Standard (built-in) heading styles are the built-in heading styles in Microsoft Word. For example, the styles "Heading 1", "Heading 2", "Heading 3" are standard heading styles. This procedure assumes you have already formatted the appropriate text with the standard heading styles.

Use this method when you want to create a table of contents with standard heading styles for a specific section in a Word document.  Create a separate bookmark for each section of the document for which you want to create a table of contents. To create the bookmark, follow these steps:  Select the entire section, and then click Bookmark on the Insert menu. In the Bookmark name text box, type a name for the bookmark, for example Part1, and then click Add.  Repeat step 1 for each section of the document for which you want to build a separate table of contents and assign a different bookmark name for each section. Move the insertion point to the location where you want the table of contents to appear for a particular section. On the Insert menu, click Field.</li> In the Field dialog box, click TOC under Field names.</li> Click Options.</li> On the Options tab, click \b under Switches, and then click Add to Field.

NOTE: The \b switch uses a bookmark to specify the area of the document from which to build a table of contents.</li> Click anywhere in the Field codes box, and then type the bookmark name for this section of your document.

This is the bookmark name that you created in step 1. The Field codes box should now look similar to the following:

TOC \b Part1

</li> Click OK to close the Field Options dialog box.</li> Click OK to close the Field dialog box.

Your table of contents for the specified section should now appear. If you do not see the table of contents, but instead see a field code similar to the following

{TOC \b Part1 \* MERGEFORMAT}

press ALT+F9 to show the results of your table of contents.</li> Repeat steps 3 through 10 for each section of your document for which you want a separate table of contents.</li></ol>

back to the top

If You Use Custom Heading Styles
NOTE: Custom heading styles are the heading styles that you have created in Microsoft Word. This procedure assumes you have already formatted the appropriate text with your custom heading styles.

Use this method when you want to create a table of contents using your custom heading styles for a specific section in a Word document.  Create a separate bookmark for each section of the document for which you want to create a table of contents. To create the bookmark, follow these steps:  Select the entire section, and then click Bookmark on the Insert menu.</li> In the Bookmark name text box, type a name for the bookmark, for example Part1, and then click Add.</li></ol> </li> Repeat step 1 for each section of the document for which you want to build a separate table of contents and assign a different bookmark name for each section.</li> Move the insertion point to the location where you want the table of contents to appear for a particular section.</li> On the Insert menu, click Field.</li> <li>In the Field dialog box, click TOC under Field names.</li> <li>Click Options.</li> <li>On the Options tab, click \b under Switches, and then click Add to Field.

NOTE: The \b switch uses a bookmark to specify the area of the document from which to build a table of contents.</li> <li>Click anywhere in the Field codes box, and then type the bookmark name for this section of your document.

This is the bookmark name that you created in step 1. The Field codes box should now look similar to the following:

TOC \b Part1

</li> <li>Click Options.</li> <li>On the Options tab, click \t under Switches, and then click Add to Field.</li> <li>Click anywhere in the Field Codes box, and then type the name of your custom style that you want to use to build the table of contents. (For example, type the name MyCustomStyle .)

The Field Codes box should now look similar to the following:

TOC \b Part1 \t MyCustomStyle

</li> <li>Click OK to close the Field Options dialog box.</li> <li>Click OK to close the Field dialog box.

Your table of contents for the specified section should now appear. If you do not see the table of contents, but instead see a field code similar to the following

{TOC \b Part1 \t MyCustomStyle \* MERGEFORMAT}

press ALT+F9 to show the results of your table of contents.</li> <li>Repeat steps 3 through 13 for each section of your document for which you want a separate table of contents using your custom style.</li></ol>

back to the top

If You Use TC Fields
Use this method when you want to build a table of contents using TC fields and not heading styles.

Step 1: Mark the Text with TC Fields
If you will be using TC fields to build the table of contents, mark the text that you want to include in the table of contents. To do this, follow these steps: <ol> <li>Select the text that you want to include and then press ALT+SHIFT+O.

The Mark Table of Contents Entry dialog box appears.</li> <li>The text that you selected should appear in the Entry box. Change the Table identifier box to the appropriate identifier.

For example, click C as the table identifier for the selected text. If you mark additional text to include in the same table of contents, make sure that you use the same table identifier.

NOTE: You can also assign a different indent level to the selected text by changing the number in the Level box.</li> <li>Click Mark.

Word creates a TC field in your document that contains the text that you selected. The TC field appears similar to the following example

{TC "Text" \f C \l "1"}

where "Text" is the text that you selected to include in your table of contents.</li> <li>Repeat steps 1 through 3. Do not change the Table identifier box if you want to include the selected text in the same table of contents. However, if you want the newly selected text to have a different indentation level, change the Level box to the appropriate setting.</li> <li>When you are finished selecting entries for the table of contents, click Close to close the Mark Table of Contents Entry dialog box.</li></ol>

back to the top

Step 2: Create the Table of Contents Using the TC Fields
After you have marked all of the text you want to include in a specific table of contents, you now need to build the table of contents. To do this, follow these steps: <ol> <li>On the Insert menu, click Field.</li> <li>In the Field dialog box, click TOC under Field names, and then click Options.</li> <li>In the Options dialog box, click \f under Switches, and then click Add to Field.</li> <li>Click anywhere in the Field Codes box and type the table identifier you used for the TC fields for this table of contents.

For example, if you marked text (in step 1 of this method) with the table identifier of C, then type C in the Field Codes box.

The Field Codes box now looks similar to the following:

TOC \f C

</li> <li>Click OK to close the Field Options dialog box.</li> <li>Click OK to close the Field dialog box.

Your table of contents for the specified section should now appear. If you do not see the table of contents, but instead see a field code similar to the following

{TOC \f C \* MERGEFORMAT}

press ALT+F9 to show the results of your table of contents.</li></ol>

NOTE: Repeat step 1 and step 2 of this method for each separate table of contents you want in your Word document.

back to the top

If You Use a Combination of Heading Styles and TC Fields
Use this method when you want to build a table of contents using both heading styles and TC fields. For example, use this method when you want to build a main table of contents for your Word document.

NOTE: This procedure assumes you have already marked the text to be included in your table of contents using either heading styles (custom heading styles) and TC fields. <ol> <li>Move the insertion point to the location where you want the table of contents to appear in the document.</li> <li>On the Insert menu, click Index and Tables.</li> <li>On the Index and Tables tab, click Options.</li> <li>In the Table of Contents Options dialog box, select both the Styles check box and the Table entry fields check box under Build table of contents from, and then click OK.

NOTE: Under Available styles, make sure that each of the styles (standard or custom styles) are selected that you want to use to build the table of contents.</li> <li>Click OK to close the Table of Contents Options dialog box.</li> <li>On the Table of Contents tab, select or change any of the options to modify the style of your table of contents, and then click OK.

NOTE: If you have other table of contents in your Word document, click No when you receive the following message:

Do you want to replace the selected table of contents?

</li></ol>

The table of contents is now displayed. If you see a field code similar to the following

{TOC \o \f \h \z \t "Heading 4,4,Heading 5,5,Heading 6,6,Heading 7,7,Heading 8,8,Heading 9,9" \* MERGEFORMAT}

instead of the table of contents, press ALT+F9 to show the results of your table of contents.

back to the top

<div class="references_section">