Heading 1/2/3 TOC entries -- what's the secret to removing?

  • Thread starter Graham Wideman [Visio MVP]
  • Start date
G

Graham Wideman [Visio MVP]

Folks:

1. Permanently unsetting Heading 1/2/3 TOC
-----------------------------------------

We work with some docs that are assembled by copy-and-paste from other docs.

In those docs, people have used Style Heading 1, 2 and 3 for random
purposes, not needed for the Table of Contents, and in the big doc we define
our own styles which we *do* want in the TOC.

No problem using the Edit Field > TOC > Options to set or unset particular
styles to appear in the TOC. However, if we unset Heading 1, 2, 3 then
almost always when we later revisit that same dialog, Heading 1, 2 and 3 get
reinstated for TOC levels 1, 2 and 3.

This seems to happen only as a result of opening the Options > "Table of
Contents Options" dialog, and not before.

Anyone know what mechanism might be doing this? Is it perhaps copying
settings from some normal template or something?

2. Edit Field doesn't see TOC Field?
------------------------------------
And on a related note, if I select a TOC field in a Word doc, usually the
Edit Field dialog already knows it's a TOC field and offers me a "Table of
Contents..." button leading to the "Table of Contents" dialog. At other
times the Edit Field dialog seems to think this is a Formula field and
offers a "Formula..." button. At that point you have to respecify that this
is a TOC and not a formula. This doesn't seem right.

Anyone seen this or know why this happens?

Word 2003 SP2
 
J

Jezebel

Unfortunately the style arguments to the TOC field are not retained between
updates. (Bug or design fault, depending on your point of view.) Two
work-arounds --

1. Reformat the imported matter to use non-TOC styles. (good solution)

2. Define the TOC field exactly as you want it. Define it as an autotext
entry. Re-insert as needed (cludgy solution)

Note that you can set the Outline level for your own styles, so you don't
need to do anything special to include them in the TOC.
 
G

Graham Wideman [Visio MVP]

Jezebel:

Thanks for the reply. FWIW
Unfortunately the style arguments to the TOC field are not retained
between updates. (Bug or design fault, depending on your point of view.)
work-arounds --

1. Reformat the imported matter to use non-TOC styles. (good solution)

Not easily done automatically, given that we have no control over the source
of these docs, unfortunately.
2. Define the TOC field exactly as you want it. Define it as an autotext
entry. Re-insert as needed (cludgy solution)

Might be an improvement -- thanks.
Note that you can set the Outline level for your own styles, so you don't
need to do anything special to include them in the TOC.

Yes -- one revelation for me is that TOC is so related to Outline
functionality. That was NOT obvious at the outset!

Graham
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Graham:

You may be referring to two different entities: Heading 1, 2, 3, and Style
Heading 1, 2, 3... Which one do you mean?

Heading 1, 2, through to 9 are part of the built-in style set in every
document. They are always there, and are hard-coded with an Outline Level
property that makes them reliable for use in numbering and Tables of
Contents.

"Style Heading 1", "Style Heading 2" etc are the bastard progeny of the Keep
Track of Formatting option in Tools>Options>Edit. These are styles that are
created on-the-fly when users make modifications to the formatting of
paragraphs that have styles applied. These "Linked Styles" are based upon
the underlying styles of the paragraphs, with the user's formatting salad
imposed over the top.

If you force the users to turn OFF "Keep Track of Formatting", you won't
create the linked styles.

By setting the switches in the TOC fields you can choose or not choose any
combination of styles to appear in the TOC. For simplicity, we strongly
recommend that you customise the built-in Heading series to your purposes
and use those. If this is done correctly, the built-in properties of the
Heading styles mean that the TOC and outline goes right and stays right.

However, you can nominate other styles to use in your TOC if you want, and
you can remove the Heading series of styles by ensuring that your TOC does
not have either the /o switch or the style names listed in its definition.

You can even check the "From fields" box and deselect the other. Remove all
the style names. This enables you to compile the TOC from TC fields.
Duplicate the text you want to appear in each TOC Heading into TC fields.
The content of the TC fields won't print, but it will appear in the TOC.
This enables you to have different text in the body of the book and in the
TOC (usually a very bad idea) or to have certain headings appear in the TOC
at a level different from the heading level at which they appear in the body
(the only time that's useful is if the structural design of the book is
REALLY bad!).

The formatting of a TOC is done at compile time with TOC styles. If you
want control over the formatting of your TOC, you MUST set the "Format" to
"From Template". If you set it to ANY other setting, Word overwrites your
formatting and specifications with its built-in settings each time the TOC
regenerates.

"From Template", by the way, is misleading. It means "From the local TOC
Template stored in the Document". It does not mean "From the Template
attached to the document."

If you select a TOC and Word does not recognise that it is a TOC field, you
have not selected the TOC accurately. Display field codes for the document
and chances are you will see that the TOC field buts up against another
paragraph mark that you have inadvertently selected. If you accurately
select ONLY the TOC field codes, Word will recognise it as a TOC. If Word
does not recognise the selected field, it shows you the list of all possible
field codes: the "= Formula" field is simply the top item in that list.

It is far quicker to produce a simple one-page guide showing users how to
use the correct styles, together with setting the expectation that you want
them to adhere to this. The only way to se that expectation is to return
their text to them saying it "does not comply with the company standard,
please fix."

When you have MVP-level skills, it's easy to be tempted to go for a
"High-Tech sledgehammer" to crush a process-problem nut. I have 30 years
experience of doing this for a living to teach me that solving the process
problem will be far quicker, less expensive, and more robust in service :)

Hope this helps


Folks:

1. Permanently unsetting Heading 1/2/3 TOC
-----------------------------------------

We work with some docs that are assembled by copy-and-paste from other docs.

In those docs, people have used Style Heading 1, 2 and 3 for random
purposes, not needed for the Table of Contents, and in the big doc we define
our own styles which we *do* want in the TOC.

No problem using the Edit Field > TOC > Options to set or unset particular
styles to appear in the TOC. However, if we unset Heading 1, 2, 3 then
almost always when we later revisit that same dialog, Heading 1, 2 and 3 get
reinstated for TOC levels 1, 2 and 3.

This seems to happen only as a result of opening the Options > "Table of
Contents Options" dialog, and not before.

Anyone know what mechanism might be doing this? Is it perhaps copying
settings from some normal template or something?

2. Edit Field doesn't see TOC Field?
------------------------------------
And on a related note, if I select a TOC field in a Word doc, usually the
Edit Field dialog already knows it's a TOC field and offers me a "Table of
Contents..." button leading to the "Table of Contents" dialog. At other
times the Edit Field dialog seems to think this is a Formula field and
offers a "Formula..." button. At that point you have to respecify that this
is a TOC and not a formula. This doesn't seem right.

Anyone seen this or know why this happens?

Word 2003 SP2

---------------------------

Thanks,

Graham

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 

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