Results 1 to 4 of 4
  1. #1
    rgbargy
    Guest

    Variable header data based on styles (2000)

    I have a long document (170 plus pages) that has perhaps 30 major headings throughout. I've used the Heading1 style to define these headings. What I would like to do is automatically place the text of the current Heading1 style in the header, such that it changes automatically with the text in Heading1. Each time that the Heading changes, there is a page break, so there is not the problem of two Heading1's on a single page.

  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Variable header data based on styles (2000)

    Ah, but headings can only change if there is a section break in between. I believe you could do this with some good VBA code and textboxes, but I wouldn't want to be you.

    Now, if you put a Next-page section break right in front of each Heading 1 and then hit Insert-Bookmark and name them 1stHead1, etc., you can then go into the header, and choose Insert-Cross reference and choose the exact Heading1 that contains the text you want to return. This would save you from changing header text if your heading text changed...

  3. #3
    BAM
    Guest

    Re: Variable header data based on styles (2000)

    Hi rgbargy,

    If what you want is similar to how a dictionary headers/footers appear, then you need a StyleRef field. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> What you want would look something like:

    { STYLEREF "Heading 1" }
    ~~~~~~~~~~~~~
    Cheers! <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>

  4. #4
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Variable header data based on styles (2000)

    You'll need a { STYLEREF "Heading 1" } field in the header (no need for section breaks). The text in the header will automatically be set in a "Header" style that cou can mofify to look like a smaller version of your "Heading 1" style.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •