Hi Sol:
No. This is a little confusing, the Help could be better worded.
1) There are two ways to build the TOC, one with Style names, the other
with TC Codes.
2) The two methods are not mutually-exclusive. You can have both in the
one document. If you do, you better really know what you're doing because
the range of permutations and variations rapidly gets to be extreme.
For almost every known case imaginable, use Style Names to rebuild your TOC.
3) Where at all possible, customise the formatting of the existing built-in
Word styles Heading 1 through Heading 9 for your headings, and use those
styles for the document headings. If you do that, you do not need to do
anything else: the TOC will build automatically when you insert it.
4) When creating highly-complex structured documentation, there "may" be
times when you need to use TC fields. These should basically be used only
IN ADDITION to the style names, and only for things such as Appendixes with
Numbered headings. Even in those cases, it's usually far better to continue
using style names to build the TOC.
It has been about five or ten years since I was last forced to use TC fields
in a TOC. I occasionally encounter them in documents built by people who
did not really understand the mechanism, but I have never seen an actual
condition where they were actually needed.
This is important, because using TC fields is a lot of work and a lot of
maintenance in a long document
A correctly-structured and formatted document does not require TC fields. A
document in which "some" of the level 3 headings should be in the TOC and
"some" should not, DOES require TC fields. It usually also requires some
serious editing and design help
(If the TOC should contain level 3
headings, then logically, it should contain all of them. If the book
contains some headings at level 3 that do not belong in the TOC, then the
book has structural problems. Using the TOC is one quick way to find them!
To omit page numbers from your top two styles, add \n "1-2" to your TOC
field (without the quotes). E.g. { TOC \o "1-5" \n "1-2" } Technically,
you do not require the quotes arount "1-2", but I put them in to make things
easier to read.
While you do not HAVE to use the built-in Heading styles for your headings,
I implore you to do so: you will save just so MUCH work and frustration down
the track. Yes, you "can" create your own heading styles. Yes, they "will"
work OK if you do it perfectly. And yes, you "could" even train your other
authors to use them.
But in any realistic group working environment, I can tell you from bitter
experience that misery, corruption, late nights and bitter thoughts will be
in your future. The built-in styles contain some hard-coded properties that
force them to be suitable for this usage. Because they're hard-coded, users
can't change them and thus stuff things up for you
Hope this helps
Hi Dalya
Thanks for this, but I am somewhat confused, and I have read the Help topic.
Do I have to mark each heading which has to go into the TOC? The TOC will be
part of a report template to be used by several people for different reports
and the TOC will be updated as the report-making progresses. How do I enter
this manually?
What I want to do is create a macro which replaces the auto TOC and
consistently creates the following:
Level 1 style using TOC1 but with no page numbers
Level 2 style using TOC2 but with no page numbers
(both of these entries are really headers within the TOC)
Level 3 style using TOC3 (a bulleted style) with page numbers at the right
margin.
I cannot see how I can do this with the auto TOC (and I have tried to!). Can
I do it using the TC fields? If so, how do I generate the TOC I want using
TC fields?
None of the styles I have marked to go into the TOC are named Heading 1,
Heading 2, Heading 3 but I can change that if it makes TOC creation easier.
I have instead set them at Level 1, 2 & 3. With the auto TOC I can select
the styles I want, but the selection does not stay. I have to select the
styles every time I want to create a TOC and that¹s not practical for
template users who don¹t know much about Word.
I have already reformatted the TOC1, TOC2 and TOC3 styles for my purposes,
though I cannot get the TOC3 style to put the page number at the right
(maybe the bullet is affecting this)
Many thanks
Sol
--
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 4 1209 1410