You receive the "Error! Not a valid heading level range" error message when you update a Word 2000 table of contents in Word 97 (220520)



The information in this article applies to:

  • Microsoft Word 2000
  • Microsoft Word 97 for Windows

This article was previously published under Q220520

SYMPTOMS

When you update a table of contents in a Word 2000 document opened in Microsoft Word 97 for Windows, the following error message may appear in place of the table of contents:
Error! Not a valid heading level range.

NOTE: To update a table of contents, select the table of contents and then press F9.

CAUSE

The \o switch instructs the TOC field to use heading levels to build the table of contents. When the table of contents is inserted (on the Insert menu, click Indexes and Tables) and all nine heading levels are selected, Word does not include the parameters with the \o option as part of the field. However, if fewer levels are selected (for example, eight levels), Word includes the levels as part of the \o switch.

WORKAROUND

Modify the \o switch in the TOC field to include all nine heading levels, using the following steps:
  1. To show the table of contents field codes, do one of the following:

    • On the Tools menu, click Options. On the View tab, select the Field Codes check box and then click OK.

      -or-

    • Press ALT+F9.
  2. Modify the TOC field to include the heading levels. When you show the field codes, the TOC field may appear as the following example:

    {TOC \o \h \z}

    Add the heading levels as in the following example:

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

  3. With the insertion point within the field, press F9 to update the table of contents.
  4. Press ALT+F9 to turn the field codes off and display the table of contents.
For more information about other switches you can use with the table of contents (TOC) field, click Microsoft Word Help on the Help menu, type TOC field code in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:12/2/2004
Keywords:kbbug kbnofix KB220520