View Single Post
  #8   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

What you want is not the \t switch in the TOC but the \l switch in the TC
field:

\l Level
The level of the TC entry. For example, the field { TC "Entering Data" \l
4 } marks a level-4 entry, and Microsoft Word applies the built-in style TOC
4 to that entry in the table of contents. If no level is specified, level 1
is assumed.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Chip Orange" wrote in message
...
Yes, thank you for trying to help, but that's not exactly the problem.

I'm
not building the TOC from styles, but from TC fields; therefore, I'm stuck
using the standard TOC1 through TOC9 styles (as far as I know).

Associating
TOC9 with the Heading1 style therefore won't help me.

I was hoping for a switch that would say, in effect, use this instead of
TOC1 for level 1. As you point out, the "\t" switch would do this if I

were
using styles to form my TOC, but I'm not. (I believe the method you
describe is a way to automate the use of the "\t" switch isn't it?).

What I've done for now is to use a document variable to store user
preferences, and then modify TOC1 using AutoOpen() based on user
preferences. Works alright for now, but just checking on my understanding
of TOCs in Word.

Thanks again,

Chip


"Suzanne S. Barnhill" wrote in message
...
You can create a TOC that uses TOC 9 for Heading 1. In the TOC options,

this
is a matter of typing 9 (rather than 1) beside Heading 1. You then need

to
format TOC 9 as required. See also
http://word.mvps.org/FAQs/Formatting/TOCSwitches.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Chip Orange" wrote in message
...
Thanks Robert.

When I first read of the "\t" switch, I too thought it would do what

you
described (and my experiments failed to verify this). Further reading

leads
me to believe that it works in the reverse direction; that is, the

named
style, when a TOC is built from styles, is used to indicate a level 1

TOC
entry, not that a level 1 TOC entry is formatted with that style.

Please correct me if you're really sure I've got it wrong way round,

and
I'll have another go at it.

Thanks.

Chip


"Robert M. Franz (RMF)" wrote in message
...
Hello Chip

Chip Orange wrote:
We have an application, with a template, which needs to cause an
automatic
update of styles within documents made from it, each time one is

opened.
We've found how to do this, and that part is working ok, and it

allows
us to
add new styles, or fix problems with existing ones, and have that

happen
automatically for our users.

If you do that via Tools | Templates and Add-ins: While this is

pretty
drastic, I would imagine that many longdocument-supporters will envy
you! :-)


What we've encountered is one particular user who needs a

different
formatting other than what TOC 1 gives her. If she modifies it in

her
document, then it's overwritten the next time she opens it.

We'd like to know is it possible to create a TOC which would use
something
other than TOC 1 as the style for formatting the contents of the

TOC?
I
don't mean with direct formatting, as that seems to be lost

whenever
she
updates the TOC field.

I have a VBA way around this, but I'd like to know just for my own

sake
and
future uses.

If it helps: you can build a TOC that uses, say, TOC 9 instead of

TOC
1
for level-1 entries, yes. Observe the TOC switches (IIRC is that

"\t").

HTH
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word