Re: How do I include header and footer text in my table of content

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Stefan - I had the exact same question as brian and I followed your advice
about the STYLEREF field in the header and then formatted the text I wanted
in the TOC and formatted white/samll like brian did. I don't understand how
the different first page eliminates the need for this. Can you explain?

Cheri

"Stefan Blom" wrote:

Glad I could help! But see Daiya's response -- since you are already
using sections you might as well enable the "Different first page"
option and exclude the STYLEREF field from the first page header, as
opposed to adding direct formatting to the heading paragraph.

--
Stefan Blom
Microsoft Word MVP


"brianscott" <brianscott@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:17430B60-D3C1-4FC6-BF80-1DCCDB6A159E@xxxxxxxxxxxxxxxx
Hi Stefan,

Thanks for that, I ended up using STYLEREF which worked well. To
get over
the problem of having two titles on the first page of the section
(the title
in the body plus the styleref title in the header) I made the title
in the
body a style that had white text (i.e. invisible) and a very small
text size
(didn't take up much vertical space). Not sure if this is the
proper way of
doing things but I achieved the effect I needed.

Thanks for your comprehensive and accurate reply.
Brian.

"Stefan Blom" wrote:

No, Word cannot "see" headings in headers and footers for the
purpose
of TOC creation. There are two possibilites here:

1. You can add a frame around each paragraph that you want in the
header area, and drag the frame into that area. (To add a frame
around
text, just select it and click the Insert Frame button on the
Forms
toolbar.) Word will see these paragraphs for TOC purposes, but
they
won't actually be in the header area; in fact, each paragraph will
*cover* more or less of the header area.

2. Alternatively, keep all headings in the main body of your
doucment
and then use a STYLEREF field in the header to have the current
heading of a specific level displayed there.

--
Stefan Blom
Microsoft Word MVP


"brianscott" <brianscott@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:D81F10BC-4E0B-4279-B41A-D54EDA88609D@xxxxxxxxxxxxxxxx
I have headers that contain text styled as "Header 1". When I
insert a Word
Table of Contents (TOC) I expected this header text to be
collected
as a TOC
entry but it is not. Only "Header 1" text from the main body of
the
document
makes it to the TOC.
Is there a way for Word to include text from Headers and Footers
in
the TOC?
I am using Word 2003.













.



Relevant Pages

  • Re: How to change a header for each chapter of a book in word doc.
    ... formatting instructions in that style are applied at one time.). ... inserted in a header or footer (header and footer: ... STYLEREF field prints the first or last text formatted with the specified ... be a paragraph style (paragraph style: ...
    (microsoft.public.word.pagelayout)
  • Re: Word 2003 - blank headers
    ... heading which is to be picked up by the StyleRef field you will get this ... The header will run fin and then no longer appear. ... > formatting has not changed from page to page. ... > I toggle field codes back to text, ...
    (microsoft.public.word.docmanagement)
  • Re: How to change a header for each chapter of a book in word doc.
    ... of the formatting instructions in that style are applied at one time.). ... When inserted in a header or footer (header and footer: ... STYLEREF field prints the first or last text formatted with the specified ... can be a paragraph style (paragraph style: ...
    (microsoft.public.word.pagelayout)
  • Re: StyleRef fields
    ... character limit to the size of the text copied by the styleref field ... only the text is inserted in the header and any formatting is lost. ... way of getting a StyleRef field to respect the format of the text it picks ...
    (microsoft.public.word.formatting.longdocs)
  • Re: Ask Dan Freeman
    ... My immediate problem is my macros that I just renamed, ... Header of the new page says Header Section 2 as if it were part of the ... How do I get rid of the formatting? ...
    (microsoft.public.word.docmanagement)