Can't Build TOC or Index in RTF Document (145639)



The information in this article applies to:

  • Microsoft Word for the Macintosh 6.0
  • Microsoft Word for the Macintosh 6.0.1
  • Microsoft Word for Windows 6.0
  • Microsoft Word for Windows 6.0a
  • Microsoft Word for Windows 6.0c
  • Microsoft Word for Windows 95
  • Microsoft Word for Windows NT 6.0

This article was previously published under Q145639

SYMPTOMS

When you attempt to insert or update a table of contents in a document that was created in Word, saved in Rich Text Format (RTF), and then reopened in Word, any of the following may occur:

If you insert a table of contents

Word does not find TC (Table of Contents Entry) fields for the table of contents.

If you update the table of contents (the entire table)

The message "Error! No table of contents entries found" appears in place of the table of contents

-or-

The only table of contents entries that appear are those that were created the RTF document was opened

If you attempt to insert or update an index in the same document

You receive one of the following messages:
Error! No index entries found.

-or-

Word found no XE (Index Entry) fields for the index.
NOTE: If you update an existing table of contents and choose to update the page numbers only, the page numbers are updated correctly.

CAUSE

This problem occurs if you create TC or XE fields manually (by pressing CONTROL+F9 or COMMAND+F9 and typing the TC or XE field code instructions) when the Change Straight Quotes To Smart Quotes option is turned on.

When you reopen the RTF file, Word adds an extra set of quotation marks within the TC and XE fields. Word does this wherever it sees smart (curly) quotes.

If straight quotation marks surround the information in the TC and XE fields, Word does not add any quotation marks.

STATUS

Microsoft has confirmed this to be a problem in the products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUND

To work around this problem, use any of the following methods.

Method 1: Disable the Change Straight Quotes To Smart Quotes option before you enter TC or XE fields.

Word version 6.0 (Windows and Macintosh):

  1. On the Tools menu, click AutoCorrect.
  2. Clear the Change 'Straight Quotes' To 'Smart Quotes' check box.
  3. Click OK.
Word version 7.0:

  1. On the Tools menu, click Options.
  2. Select the AutoFormat tab.
  3. In the Replace As You Type area, clear the Straight Quotes with 'Smart Quotes' check box.
  4. Click OK.
Method 2: If you have already created the document, use this method to search for the double sets of quotation marks and replace them with a single set:

  1. On the Tools menu, click Options.
  2. Select the View tab.
  3. In the Show area, select Field Codes.
  4. In the Nonprinting Characters area, select Hidden Text.
  5. Click OK.

    You should now be able to see the TC and XE fields.
  6. On the Edit menu, click Replace.
  7. In the Find What box, type the following (these are the ANSI codes of the straight quote and left smart quote):

    ^0034^0147

  8. In the Replace With box, type the following:

    ^0034

  9. Click Replace All.

    NOTE: If you entered a double set of quotation marks in step g, skip steps j-l.
  10. After the replacements have been made, erase the text in the Find What box and type the following (these are the ANSI codes of the right smart quote and the straight quote):

    ^0148^0034

  11. In the Replace With box, type the following:

    ^0034

  12. Click Replace All.

    You can now build the table of contents and index successfully.

MORE INFORMATION

This problem also occurs when you convert your document to other formats, such as Word for Windows 2.x. During the conversion process Word first converts the document to Rich Text Format and then converts it to the new foreign format.

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbconversion KB145639