Microsoft KB Archive/285059

= How to create a table of contents by marking text in Word =

Article ID: 285059

Article Last Modified on 12/20/2006

-

APPLIES TO


 * Microsoft Office Word 2007
 * Microsoft Office Word 2003
 * Microsoft Word 2002 Standard Edition

-



This article was previously published under Q285059



IN THIS TASK
SUMMARY Create Table Of Contents Mark the Text to Include in the Table of Contents
 * Use Lead-in Emphasis with Heading Styles
 * Use Style Separators with Heading Styles
 * Removing a Heading from the Table of Contents

REFERENCES



SUMMARY
One of the most common features of professional documents is the table of contents (TOC). Microsoft Word makes the creation of a TOC easier by allowing you the option of creating a TOC without using styles and by allowing you to mark a single word or group of words in a particular body of text and add that information to the TOC.

A TOC can be generated by using the Lead-in Emphasis feature to apply heading styles to any lead-in text (the first word or words in a paragraph or sentence). By using the Lead-in Emphasis feature, you can create paragraphs where the first portion of the paragraph is formatted with a heading style and appears in the TOC, but the rest of the paragraph is normal text and does not appear in the TOC. This article describes how to use this new feature to create a TOC.

back to the top

Create Table of Contents
In Word, you can create a TOC based on a portion of the text in a paragraph without including the whole paragraph. You can mark text by using the Lead-in Emphasis feature with heading styles to include the text in a TOC.

To insert a table of contents, follow these steps:
 * 1) Start Word, and then open your document.
 * 2) Click an empty paragraph where you want to insert the TOC.
 * 3) On the Insert menu, point to Reference, and then click Index and Tables.

Note In Microsoft Office Word 2007, click Table of Contents in the Table of Contents group on the References tab. Then, click Insert Table of Contents.
 * 1) Click the Table of Contents tab, and then click Show Outlining Toolbar.

Note In Word 2007, skip this step.
 * 1) In the Index and Tables dialog box, select the options that you want to apply to your TOC, and then click OK.

Note In Word 2007, select the options that you want to apply to the TOC in the Table of Contents dialog box, and then click OK.

Note If the text that is contained in your document is not marked to be included in a TOC, you receive the following error message in your document instead of the TOC:

Error! No table of contents entries found.

back to the top

Mark the Text to Include in the Table of Contents
The next step is to mark the text that you want to include in your TOC by using Lead-in Emphasis with heading styles. Use one or more of the following methods to mark text that you want to include in the TOC.

back to the top

Use Lead-in Emphasis with Heading Styles
 Select any lead-in text in your document that you want to include in your TOC. For example, you may have a paragraph that includes lead-in text to introduce the remainder of the paragraph's text. In the following paragraph, if you want to include the introductory words &quot;Widow and Orphan&quot; in your TOC, just select these words, and then continue with the steps.

Widow and Orphan: A widow is the last line of a paragraph printed by itself at the top of a page. An orphan is the first line of a paragraph printed by itself at the bottom of a page.

 Click the drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want.

Note In Word 2007, click the heading style that you want in the Styles group on the Home tab. Click Update TOC on the Outlining toolbar to update the TOC.

Note In Word 2007, click Update Table in the Table of Contents group on the References tab. In the Update Table of Contents dialog box, click Update the Entire table, and then click OK.

Note In Word 2007, click Update the Entire table in the Update Table of Contents dialog box.

If you click Show/Hide on the standard toolbar, note that there are no special characters in the paragraph to indicate lead-in emphasis applied to the text. However, the text formatted as a heading level appears in the document's TOC. Because no hidden paragraph markers or other items are used, the whole process is seamless. Word uses a new underlying feature named &quot;Linked character styles&quot; to do this.

The heading style applied to the lead-in portion of the document is displayed as a heading style, but it is actually a linked character style. In Word 2002 and later, when you apply a paragraph style to a subset of paragraph, the following behavior occurs:
 * A hidden character style is created that takes the same character properties as the paragraph style being applied.
 * The character style is applied to the selection.

NOTE: The hidden character style created with linked character styles appears in the Style drop-down list if the document is opened and viewed in earlier versions of Word. The functionality of the style separator is lost if the document is saved in an earlier version of Word.

To view the hidden character style, follow these steps:  On the Format menu, click Reveal Formatting.

The Reveal Formatting task pane appears.

Note To open the Reveal Formatting task pane in Word 2007, follow these steps:  Click the Styles dialog box launcher in the Styles group on the Home tab.</li> In the Styles window, click Style Inspector.</li> Click Reveal Formatting.</li></ol> </li> Select the text in your document and notice that exact formatting details appear in the Reveal Formatting task pane.</li> Select the text that has the character style applied and note that the text appears as a character style in the Reveal Formatting task pane. The linked style appears as Heading Char in the Reveal Formatting task pane. The actual character style remains hidden in the Styles and Formatting task pane or the Style drop-down list on the Formatting toolbar.</li></ol>

Any paragraph style can be used for the linked character style. A paragraph style can be created that looks exactly like the body text paragraph style, and then applied to a portion of a paragraph. In this manner, the text that is used to build the TOC can exactly match the text in the paragraph, assuming the TOC options are modified to include the style for the lead-in text.

back to the top

Use Style Separators with Heading Styles
The style separator is a new feature to Word 2003 and Word 2002. Style separator tags allow you to do the following:
 * Apply heading styles to a single word or phrase in a paragraph so that only that word or phrase appears in the TOC.
 * Include two styles in a single paragraph so that the lead-in paragraph appears in the TOC.
 * Apply outline levels to lead-in text so that only the lead-in text appears in the TOC.
 * Apply outline levels to a single word or phrase in a paragraph so that only that word or phrase appears in the TOC.

The style separator is a hidden paragraph mark that serves as a delineator between separate styles applied in a document. To make the style separator mark visible, follow these steps:
 * 1) On the Tools menu, click Options.
 * 2) On the View tab, click All under Formatting Marks.

Before you can use the Style Separator feature, you must add the Style Separator button to your toolbar:
 * 1) Click Customize on the Tools menu.
 * 2) Click the Commands tab, and then click All Commands in the Categories list.
 * 3) Locate InsertStyleSeparator in the Commands list, and then drag it to the Formatting toolbar. Click Close.

Note To add the Style Separator button to the toolbar in Office Word 2007, follow these steps:
 * 1) Click the Microsoft Office button, and then click Word Options.
 * 2) Click Customize.
 * 3) In the Choose commands from list, click All Commands.
 * 4) In the list of commands, click Sytle Separator, click Add, and then click OK.

Insert the style separator before you apply the heading style to your text. To do this, use one of the following methods.

Method A: Use Style Separators to add a single word or phrase in a paragraph to the TOC:
 * 1) As you type, and you reach a word or phrase in a paragraph that you want to include in the TOC, click the Style Separator button. When you click the Style Separator button, the insertion point moves to the right of the separator so that you can continue typing.
 * 2) Type the word or phrase that you want to include in the TOC, and then click the Style Separator button again.
 * 3) Select the word or phrase that you want to include in the TOC, click the drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want.

The word or phrase between the two style separators appears in the TOC.

Method B: Insert the Style Separator between two existing paragraphs:

You can use the style separator between two existing paragraphs so that the first paragraph becomes the lead-in text and appears in the TOC, and the second paragraph is the remainder of the text and does not appear in the TOC. To do this, follow these steps:
 * 1) Create two paragraphs of text, placing text that you want to appear in the TOC in the first paragraph, the remainder of the text in the second paragraph.
 * 2) Position the insertion point in the first paragraph, and then click the Style Separator button.

The two paragraphs appear to become a single paragraph by converting the paragraph mark at the end of the first paragraph to a style separator. You now have a single compound paragraph, which shows up as two separate paragraphs in Outline view, but which prints as a single paragraph.
 * 1) Select the text to the left of the separator, click the drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want.

The TOC displays only the lead-in portion (the first paragraph) formatted with the heading style.

NOTE: The style separator is a special form of a hidden paragraph mark. Therefore, documents with style separators that are created in Word 2002 and in later versions of Word appear the same in Word 2000 and in Microsoft Word 97 unless you click All under Formatting Marks. If you click All under Formatting Marks in earlier versions of Word, the style separator hidden paragraph mark appears as a normal paragraph mark, and the document will be repaginated.

When you use an earlier version of Word to view documents that have style separators that were created in Word 2002 and in later versions of Word, do not click All under Formatting Marks.

back to the top

Removing a Heading from the Table of Contents
If you want to remove a heading from the TOC, you can apply a new paragraph style to the marked text:
 * 1) Select the marked text, click the drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want. (Click Normal to remove the heading style.)
 * 2) Click Update TOC on the Outlining toolbar to update the TOC.

Note In Word 2007, click Update Table in the Table of Contents group on the References tab.
 * 1) In the Update Table of Contents dialog box, click Update the Entire table, and then click OK.

Note In Word 2007, click Update the Entire table in the Update Table of Contents dialog box.

NOTE: By applying the paragraph style that you want to the whole paragraph, you do not remove the style. You must select the exact text as it appears in the TOC, and then apply the new style.

back to the top

<div class="references_section">