Unwanted text in TOC

D

DeanV

For Word 2003, I'm picking up unwanted text in the TOC from 1) Cover page
with unique page setup 2) text within the document.

I've checked the unwanted text to ensure they are formatted with 'body text'
and don't see any paragraph characters beside them.

Thanks.
 
D

Derflederdog

Chances are you have text in your document that is (incorrectly) of a style
that Word includes in TOCs. In other words, the stuff that is in the TOC
from your cover page is probably a Heading 1/2/3/etc. style.

Change the style of the text that is erroneously in your TOC and regenerate
your TOC and your problem will likely go away.
 
S

Stefan Blom

[...] I'd still want
to rid my document of those spurious headings and paragraph levels.

Pam, note that this is also covered in the linked article.

--
Stefan Blom
Microsoft Word MVP



Pamelia Caswell via OfficeKB.com said:
Hi, Stefan,

Oh, that's a much faster way to clear up the problem TOC--but I'd still
want
to rid my document of those spurious headings and paragraph levels.

I've often wondered about the difference between \o and \u. I've long
added
the paragraph level to style definitions to so the style would get picked
up
by the TOC, and I've deleted the \u with no effect. Now I know that's
because \u applies to _direct formatting_.

Thanks so much,

Pam

Stefan said:
If your assumption is correct, deleting the \u switch from the TOC field
code would suffice (the switch instructs Word to include paragraphs that
have outline levels 1--9 applied as direct formatting). See also
http://word.mvps.org/faqs/general/DocumentMap.htm.
The unwanted TOC paragraphs may have the wrong paragraph outline level
applied. This sometimes happens if the the document map has been
opened.
[quoted text clipped - 12 lines]
 
S

Stefan Blom

I agree: those descriptions certainly aren't (sufficiently) clear. To learn
the difference, one has to do some testing.

--
Stefan Blom
Microsoft Word MVP



Pamelia Caswell via OfficeKB.com said:
And how could I have figured that out? Here are the descriptions from the
field options dialog:

\o Builds a table of content by using outline levels instead of TC
entries
\u Builds a table of content by using the applied paragraph outline level

Pam

Pamelia said:
Hi, Stefan,

Oh, that's a much faster way to clear up the problem TOC--but I'd still
want
to rid my document of those spurious headings and paragraph levels.

I've often wondered about the difference between \o and \u. I've long
added
the paragraph level to style definitions to so the style would get picked
up
by the TOC, and I've deleted the \u with no effect. Now I know that's
because \u applies to _direct formatting_.

Thanks so much,

Pam
If your assumption is correct, deleting the \u switch from the TOC field
code would suffice (the switch instructs Word to include paragraphs that
[quoted text clipped - 6 lines]
 
S

Suzanne S. Barnhill

Since I also build TOCs based on styles and rarely fiddle with outline
levels, I also hadn't figured out this difference, but it's wonderfully
useful information to know. When I get a chance, I'll add that to my TOC
Tips article because it does provide a way to add a single heading to a TOC.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Pamelia Caswell via OfficeKB.com said:
Hi, Stefan,

Oh, that's a much faster way to clear up the problem TOC--but I'd still
want
to rid my document of those spurious headings and paragraph levels.

I've often wondered about the difference between \o and \u. I've long
added
the paragraph level to style definitions to so the style would get picked
up
by the TOC, and I've deleted the \u with no effect. Now I know that's
because \u applies to _direct formatting_.

Thanks so much,

Pam

Stefan said:
If your assumption is correct, deleting the \u switch from the TOC field
code would suffice (the switch instructs Word to include paragraphs that
have outline levels 1--9 applied as direct formatting). See also
http://word.mvps.org/faqs/general/DocumentMap.htm.
The unwanted TOC paragraphs may have the wrong paragraph outline level
applied. This sometimes happens if the the document map has been
opened.
[quoted text clipped - 12 lines]
 
S

Stefan Blom

Note that a (brief) description of the \u switch is included in the article
on the Document Map at http://word.mvps.org/faqs/general/DocumentMap.htm
(written by Daiya Mitchell).

Of course, it's still a good idea to explain the switch in your TOC Tips
article. To tell you the truth, I kind of assumed you had already done that!
:)

--
Stefan Blom
Microsoft Word MVP



Suzanne S. Barnhill said:
Since I also build TOCs based on styles and rarely fiddle with outline
levels, I also hadn't figured out this difference, but it's wonderfully
useful information to know. When I get a chance, I'll add that to my TOC
Tips article because it does provide a way to add a single heading to a
TOC.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Pamelia Caswell via OfficeKB.com said:
Hi, Stefan,

Oh, that's a much faster way to clear up the problem TOC--but I'd still
want
to rid my document of those spurious headings and paragraph levels.

I've often wondered about the difference between \o and \u. I've long
added
the paragraph level to style definitions to so the style would get picked
up
by the TOC, and I've deleted the \u with no effect. Now I know that's
because \u applies to _direct formatting_.

Thanks so much,

Pam

Stefan said:
If your assumption is correct, deleting the \u switch from the TOC field
code would suffice (the switch instructs Word to include paragraphs that
have outline levels 1--9 applied as direct formatting). See also
http://word.mvps.org/faqs/general/DocumentMap.htm.

The unwanted TOC paragraphs may have the wrong paragraph outline level
applied. This sometimes happens if the the document map has been
opened.
[quoted text clipped - 12 lines]

Thanks.
 
S

Suzanne S. Barnhill

No, and even the TOC switches article tells little more than the Help file
because I was not really familiar with those switches when I wrote the
article. Since then I've done a lot more playing around with TOCs, but not
with the \o and \u switches.

Thanks for the reminder about the DM article; I'll read that before I
proceed.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Stefan Blom said:
Note that a (brief) description of the \u switch is included in the
article
on the Document Map at http://word.mvps.org/faqs/general/DocumentMap.htm
(written by Daiya Mitchell).

Of course, it's still a good idea to explain the switch in your TOC Tips
article. To tell you the truth, I kind of assumed you had already done
that! :)

--
Stefan Blom
Microsoft Word MVP



Suzanne S. Barnhill said:
Since I also build TOCs based on styles and rarely fiddle with outline
levels, I also hadn't figured out this difference, but it's wonderfully
useful information to know. When I get a chance, I'll add that to my TOC
Tips article because it does provide a way to add a single heading to a
TOC.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Pamelia Caswell via OfficeKB.com said:
Hi, Stefan,

Oh, that's a much faster way to clear up the problem TOC--but I'd still
want
to rid my document of those spurious headings and paragraph levels.

I've often wondered about the difference between \o and \u. I've long
added
the paragraph level to style definitions to so the style would get
picked
up
by the TOC, and I've deleted the \u with no effect. Now I know that's
because \u applies to _direct formatting_.

Thanks so much,

Pam

Stefan Blom wrote:
If your assumption is correct, deleting the \u switch from the TOC field
code would suffice (the switch instructs Word to include paragraphs that
have outline levels 1--9 applied as direct formatting). See also
http://word.mvps.org/faqs/general/DocumentMap.htm.

The unwanted TOC paragraphs may have the wrong paragraph outline
level
applied. This sometimes happens if the the document map has been
opened.
[quoted text clipped - 12 lines]

Thanks.
 
S

Suzanne S. Barnhill

What confuses me is what you are doing when you remove the number from a
style or add a number to a style in the TOC Options dialog. This doesn't
actually change the outline level of the style, nor does it apply that
outline level to those paragraphs as direct formatting; all it does is tell
Word to include the style at the specified level; as noted in
http://sbarnhill.mvps.org/WordFAQs/TOCTips.htm#OmitPageNumbers, you can swap
heading levels this way (resulting in a TOC field such as { TOC \o "3-3" \n
2-3 \h \z \t "Heading 1,2,Heading 2,1" }, which results in using TOC 1 for
Heading 2 and TOC 2 for Heading 1), though you do have to clear the check
box for "Outline levels," which removes the \u switch. So that adds another
layer of complexity to the whole subject.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Pamelia Caswell via OfficeKB.com said:
One of the most misleading is this from Word 2003 help:

\o "Headings"
Builds a table of contents from paragraphs formatted with built-in
heading styles (heading style: Formatting applied to a heading. ... For
example, { TOC \o "1-3" } lists only headings formatted with the styles
Heading 1 through Heading 3. ...

I learned 6 or 7 years ago, I think in one of the other Word forums I
attend
(Word-PC maybe), that styles with paragraph outline levels other than body
text could be picked up by the TOC. That, to me meant that \o probably
stands for paragraph outline level instead of heading level. But I have
only
seen one or two people say that. And MS never corrected its help text for
W2003.

Pam
No, and even the TOC switches article tells little more than the Help file
because I was not really familiar with those switches when I wrote the
article. Since then I've done a lot more playing around with TOCs, but not
with the \o and \u switches.

Thanks for the reminder about the DM article; I'll read that before I
proceed.
Note that a (brief) description of the \u switch is included in the
article
[quoted text clipped - 41 lines]
 
S

Stefan Blom

Well, the outline levels of the built-in headings cannot be changed. In
fact, you can't even change the outline levels by applying direct
formatting: the "Outline level" option is greyed out in the Paragraph dialog
box.

--
Stefan Blom
Microsoft Word MVP



Suzanne S. Barnhill said:
What confuses me is what you are doing when you remove the number from a
style or add a number to a style in the TOC Options dialog. This doesn't
actually change the outline level of the style, nor does it apply that
outline level to those paragraphs as direct formatting; all it does is
tell Word to include the style at the specified level; as noted in
http://sbarnhill.mvps.org/WordFAQs/TOCTips.htm#OmitPageNumbers, you can
swap heading levels this way (resulting in a TOC field such as { TOC \o
"3-3" \n 2-3 \h \z \t "Heading 1,2,Heading 2,1" }, which results in using
TOC 1 for Heading 2 and TOC 2 for Heading 1), though you do have to clear
the check box for "Outline levels," which removes the \u switch. So that
adds another layer of complexity to the whole subject.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Pamelia Caswell via OfficeKB.com said:
One of the most misleading is this from Word 2003 help:

\o "Headings"
Builds a table of contents from paragraphs formatted with built-in
heading styles (heading style: Formatting applied to a heading. ... For
example, { TOC \o "1-3" } lists only headings formatted with the styles
Heading 1 through Heading 3. ...

I learned 6 or 7 years ago, I think in one of the other Word forums I
attend
(Word-PC maybe), that styles with paragraph outline levels other than
body
text could be picked up by the TOC. That, to me meant that \o probably
stands for paragraph outline level instead of heading level. But I have
only
seen one or two people say that. And MS never corrected its help text
for
W2003.

Pam
No, and even the TOC switches article tells little more than the Help
file
because I was not really familiar with those switches when I wrote the
article. Since then I've done a lot more playing around with TOCs, but
not
with the \o and \u switches.

Thanks for the reminder about the DM article; I'll read that before I
proceed.

Note that a (brief) description of the \u switch is included in the
article
[quoted text clipped - 41 lines]

Thanks.
 
S

Suzanne S. Barnhill

What's quite deceptive, though, is that if I go to Modify Style for Heading
1 in Word 2003 and choose Format | Paragraph, the outline level setting is
NOT disabled. Word lets you think you can change it (I can set it to Level 2
or Body Text and click OK), but it remains unchanged. To my mind that's a
bug.

What you can do, however, is change the TOC level of a built-in heading, by
changing the number beside it in the TOC Options dialog.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Stefan Blom said:
Well, the outline levels of the built-in headings cannot be changed. In
fact, you can't even change the outline levels by applying direct
formatting: the "Outline level" option is greyed out in the Paragraph
dialog box.

--
Stefan Blom
Microsoft Word MVP



Suzanne S. Barnhill said:
What confuses me is what you are doing when you remove the number from a
style or add a number to a style in the TOC Options dialog. This doesn't
actually change the outline level of the style, nor does it apply that
outline level to those paragraphs as direct formatting; all it does is
tell Word to include the style at the specified level; as noted in
http://sbarnhill.mvps.org/WordFAQs/TOCTips.htm#OmitPageNumbers, you can
swap heading levels this way (resulting in a TOC field such as { TOC \o
"3-3" \n 2-3 \h \z \t "Heading 1,2,Heading 2,1" }, which results in using
TOC 1 for Heading 2 and TOC 2 for Heading 1), though you do have to clear
the check box for "Outline levels," which removes the \u switch. So that
adds another layer of complexity to the whole subject.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Pamelia Caswell via OfficeKB.com said:
One of the most misleading is this from Word 2003 help:

\o "Headings"
Builds a table of contents from paragraphs formatted with built-in
heading styles (heading style: Formatting applied to a heading. ... For
example, { TOC \o "1-3" } lists only headings formatted with the styles
Heading 1 through Heading 3. ...

I learned 6 or 7 years ago, I think in one of the other Word forums I
attend
(Word-PC maybe), that styles with paragraph outline levels other than
body
text could be picked up by the TOC. That, to me meant that \o probably
stands for paragraph outline level instead of heading level. But I have
only
seen one or two people say that. And MS never corrected its help text
for
W2003.

Pam

Suzanne S. Barnhill wrote:
No, and even the TOC switches article tells little more than the Help
file
because I was not really familiar with those switches when I wrote the
article. Since then I've done a lot more playing around with TOCs, but
not
with the \o and \u switches.

Thanks for the reminder about the DM article; I'll read that before I
proceed.

Note that a (brief) description of the \u switch is included in the
article
[quoted text clipped - 41 lines]

Thanks.
 
S

Stefan Blom

It's the same problem in Word 2007, which I hadn't noticed (or maybe I had
noticed at one point and then forgotten about it). That is deceptive,
indeed, and surely it must be considered a bug. Surprising as it may seem,
if you look directly in the Paragraph dialog box (as if you are trying to
change direct paragraph formatting), the "Outline level" box *is* greyed
out.

When you change the TOC level of a built-in heading in the Table of Contents
Options dialog box, Word adds the \t switch to the TOC field code, as you've
already pointed out. That same switch is used if you specify a TOC level for
a style that doesn't have an outline level defined (and therefore won't be
added by default to the dialog box).

--
Stefan Blom
Microsoft Word MVP



Suzanne S. Barnhill said:
What's quite deceptive, though, is that if I go to Modify Style for
Heading
1 in Word 2003 and choose Format | Paragraph, the outline level setting is
NOT disabled. Word lets you think you can change it (I can set it to Level
2
or Body Text and click OK), but it remains unchanged. To my mind that's a
bug.

What you can do, however, is change the TOC level of a built-in heading,
by changing the number beside it in the TOC Options dialog.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Stefan Blom said:
Well, the outline levels of the built-in headings cannot be changed. In
fact, you can't even change the outline levels by applying direct
formatting: the "Outline level" option is greyed out in the Paragraph
dialog box.

--
Stefan Blom
Microsoft Word MVP



Suzanne S. Barnhill said:
What confuses me is what you are doing when you remove the number from a
style or add a number to a style in the TOC Options dialog. This doesn't
actually change the outline level of the style, nor does it apply that
outline level to those paragraphs as direct formatting; all it does is
tell Word to include the style at the specified level; as noted in
http://sbarnhill.mvps.org/WordFAQs/TOCTips.htm#OmitPageNumbers, you can
swap heading levels this way (resulting in a TOC field such as { TOC \o
"3-3" \n 2-3 \h \z \t "Heading 1,2,Heading 2,1" }, which results in
using
TOC 1 for Heading 2 and TOC 2 for Heading 1), though you do have to
clear
the check box for "Outline levels," which removes the \u switch. So that
adds another layer of complexity to the whole subject.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

One of the most misleading is this from Word 2003 help:

\o "Headings"
Builds a table of contents from paragraphs formatted with built-in
heading styles (heading style: Formatting applied to a heading. ... For
example, { TOC \o "1-3" } lists only headings formatted with the styles
Heading 1 through Heading 3. ...

I learned 6 or 7 years ago, I think in one of the other Word forums I
attend
(Word-PC maybe), that styles with paragraph outline levels other than
body
text could be picked up by the TOC. That, to me meant that \o probably
stands for paragraph outline level instead of heading level. But I
have
only
seen one or two people say that. And MS never corrected its help text
for
W2003.

Pam

Suzanne S. Barnhill wrote:
No, and even the TOC switches article tells little more than the Help
file
because I was not really familiar with those switches when I wrote the
article. Since then I've done a lot more playing around with TOCs, but
not
with the \o and \u switches.

Thanks for the reminder about the DM article; I'll read that before I
proceed.

Note that a (brief) description of the \u switch is included in the
article
[quoted text clipped - 41 lines]

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top