WD: Unwanted Extra Line(s) in Table of Contents (127744)
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 the Macintosh 6.0.1a
- Microsoft Word for Windows NT 6.0
- Microsoft Word for Windows 95
- Microsoft Word for Windows 95 7.0a
This article was previously published under Q127744 SYMPTOMS
The results of a TOC (table of contents) field contain one or more extra,
unwanted lines.
This problem occurs only if the headings in the document are formatted to
use either automatic numbering or heading numbering AND if any part of the
heading is also marked for an index entry. This problem occurs in Word for
Windows 95, Word for Windows NT, and Word for the Macintosh. It does NOT
occur with 16-bit Word for Windows running under Windows NT 3.5 or under
Windows for Workgroups or Windows 3.1.
For example, headings formatted like this
1. Heading 1{XE "Heading 1"}
1.1 Heading 2
1.1.1 Heading 3
generate a table of contents that looks like this:
1. Heading 1..............................1
1. .......................................1
1.1 Heading 2..........................1
1.1.1 Heading 3....................1
Notice that there is an extra line in the table of contents under the line
that contains the index entry. The extra line contains the same heading
numbering as the line that contains the index entry, as if Word is trying
to also number the index entry in the table of contents.
RESOLUTION
To resolve this problem, upgrade to the latest version of Microsoft Word.
To work around this problem, eliminate the extra lines in the table of
contents. To do this, simply place the XE field at the beginning of the
line of text rather than at the end. Do this for each XE field. For
example:
- {XE "Heading 1"}Heading 1
When you update the table of contents by selecting it and pressing F9, the
extra lines will be eliminated.
To automate the above process, create the following macro:
Sub MAIN
StartOfDocument
ToolsOptionsView .FieldCodes = 1, .Hidden = 1
EditFind .Find = "^19 xe", .Direction = 0, .Wrap = 1
While EditFindFound()
EditCut
StartOfLine
EditPaste
EditFind
Wend
End Sub
STATUS
Microsoft has confirmed this to be a problem in the versions of Word listed
above. This problem was corrected in Microsoft Word 97 for Windows and Word
98 Macintosh Edition.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | kbbug kbfield kbfix KB127744 |
---|
|