Header Styles and TOC Generation

A

Alex Foster

Does anyone know if its possible to generate a Table of
Contents based on custom styles in the header?

below is some additional explanation of what I'm trying to
do if it wasn't clear from the first part

In my documents i use multiple sections, each with their
own header, and i have a custom style called BTitle that
is used as the title style in each header. So for instance
in one document there might be a five page section title
Figures and a 7 page section titled Charts and I'd like
the index to automatically look something like

Figures 1-5
Charts 6-12

I'd really appreciate any advice people have on this,
doing this by hand has gotten kinda old. Thanks in
advance,

Alex
Emory '05
 
S

Suzanne S. Barnhill

Word cannot use text in a header as the basis for a TOC. Because a header by
definition appears on every page, Word can't resolve a page number for the
text. So even if you use a heading style in the header, Word will ignore it.
You need to put your headings in the document body instead.

You can still have this text on every page. Check the "Different first page"
box on the Layout tab of Page Setup. This gives you a separate First Page
Header, which you can leave empty. Put your Heading 1 on the first page of
the section. In the Header (which will appear on the remaining pages), use a
StyleRef field to pick up the text of Heading 1. This has the advantage that
you can have the same Header throughout the document because it will pick up
changes in Heading 1.

There is no way to generate a TOC with inclusive page numbers (except
manually). By convention, readers assume that any given section ends where
the next one begins.

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

Margaret Aldis

Hi Alex

The TOC won't pick up styles used in the header (assuming you mean by that
what Word does) nor will it give you page ranges - TOCs are intended as
lists of specific headings or similar, with the page on which each falls.

Probably the simplest workaround, if you must have this format, would be to
insert a bookmark around the title on the first page of the section and
another bookmark at the end of the last page, and then build up the TOC
format you want using cross references.

(If you can't put a printing title on the first page of the section, you can
normally fudge it with a hidden one. Note that once you have such a title in
place, you can also simplify your headers since you can use StyleRef fields
to pick up the current title.)

Hope this is some help
 

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