TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Re: WORD 97 - combining styles on one line From:"Ridder, Fred" <F -dot- Ridder -at- DIALOGIC -dot- COM> Date:Mon, 22 Jun 1998 20:05:16 -0400
"Bellomy, James" <bellomyj -at- HUACHUCA-EMH31 -dot- ARMY -dot- MIL>
asked the following question about Word 97:
>Is there any way to place two styles on the same line. I would like
>have a heading style followed by body text style and be able to use the
>automated TOC function.
>
>Only answer I have found is to manually format headings, bookmark them,
>and link from my TOC.
Well, that should work, but it must be awfully tedious unless you write
a macro to do it.
Here's an alternative solution that works in Word 95 (and which hopefully
works the same way in Word 97...):
1) Define a character style that is applied to the heading text.
2) Insert a TC (table of contents entry) field code that references that
character style using a nested STYLEREF field code.
3) Build your ToC from the TC fields using the \t switch.
For example, define a style called "char runninghead" and apply it to
the heading text. Then, some place after the text of each heading,
insert a nested field code { TC "{ STYLEREF "runninghead" }" }. Then
generate the ToC using a field code something like { TOC \o "1-4" \t },
which will pick up the standard Heading 1 through Heading 4 entries
(specified by the \o switch and the "1-3" parameter) plus the TC
field codes (specified via the \t switch).