Incorrect TOC Numbering If TC Precedes SEQ Field

Last reviewed: February 5, 1998
Article ID: Q119127
The information in this article applies to:
  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a

SYMPTOMS

A table of contents based on TC fields displays and prints incorrect chapter numbers when the TC fields precede the SEQ fields. For example, the following combination of fields produces a table of contents in which the chapter number begins at 0 (zero), even though the chapters number correctly in the body of the document:

   {TOC \f \s chap}

   {tc "One"}{Seq chap} This is chapter 1
   {tc "Two"}{Seq chap} This is chapter 2
   {tc "Three"}{Seq chap} This is chapter 3

The table of contents will appear as:

   One..................................................0-1
   Two..................................................1-1
   Three................................................2-1

CAUSE

By design, the TC fields are picking up the current sequence number. The sequence number is not set or reset until the SEQ field is updated. The 0 appears in the table of contents because the number sequence is not set to 1 until the first occurrence of the SEQ field.

RESOLUTION

Position the SEQ fields before the TC fields. The following example will produce a correct table of contents:

   {TOC \f \s chap}

   {Seq chap}{tc "One"} This is chapter 1
   {Seq chap}{tc "Two"} This is chapter 2
   {Seq chap}{tc "Three"} This is chapter 3


KBCategory: kbusage
KBSubcategory: kbfield
Additional reference words: winword2 2.0 2.0a 2.0a-cd 2.0b 2.0c 6.0
word6 6.0a 6.0c
toc tc seq table of contents entry sequence chapter numbering
incorrect winword

Keywords : kbfield
Version : 2.0 2.0a 2.0a-CD 2.0b 2.0c
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.