WD2000: Table of Contents Appears Incorrectly in Browser

ID: Q224688


The information in this article applies to:


SYMPTOMS

When you save a document that includes a table of contents (TOC) that was created in an earlier version of Microsoft Word, the table of contents appears incorrectly in the browser. Specifically, the dot leaders and page numbers do not align correctly.


CAUSE

The necessary TOC field switches have not been added to the converted TOC to allow it to appear correctly in the browser.


RESOLUTION

The concept of page numbers doesn't actually exist on Web pages. Word 2000 supports this by discarding page numbers in the Web preview of tables of contents by using field switches.

When you enter the TOC field with right-aligned numbers and leading dots in Word 97, the TOC field is as follows:

{TOC \o "1-3"}

and when you perform the same in Word 2000, it appears like this:

{TOC \o "1-3" \h \z}

The \h switch forces the entries to be displayed as hyperlinks. This switch links the entries and the page numbers within the TOC.

The \z switch hides page numbers in Web layout view.

Neither of these switches is included in the Word 97-inserted TOC field, because this functionality is not present in Word 97.

If you manually add the \z switch to the TOC field in the original document, the field code behaves as expected in Word 2000 and is ignored in Word 97.

To add the \h and \z fields to the TOC field, follow these steps:

  1. View field codes by pressing ALT+F9.


  2. Click after the existing TOC text (just before the right bracket) and type the following

    \h \z



  3. The field code for the TOC field now looks like the following:

    {TOC \o "1-3" \h \z}


MORE INFORMATION

For more information about working with tables of contents, click Microsoft Word Help on the Help menu, type "table of contents" in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Additional query words:


Keywords          : kbdta wd2000 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 17, 1999