Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Cherrybrook, New South Wales, Australia
    Posts
    116
    Thanks
    6
    Thanked 0 Times in 0 Posts

    conditional Styleref in header? (Word 2003)

    Could someone please help with this conditional header problem I am having?
    My document has 4 heading levels in use: 1, 2, 4, 5.
    Heading 2 is used for Chapters and always starts on a new page.
    Heading 1 is used for Part and also starts on a new page.
    Heading 4 is often, but not always, direct formatted to a "page break before"
    I have defined the header as STYLEREF "Heading 2" - STYLEREF "Heading 4" which gives me the chapter and topic at the top of the page perfectly for most pages.
    But sometimes I don't want the last Heading 2 - If the page starts a new Part (Heading 1) I want STYLEREF "Heading 1" instead (not the last heading 2 of the previous part).
    I am looking for a way to make the heading conditional. I can define the conditions in English but don't know if it is possible within a field code in a header.
    Here is the logic in plain English:
    If the page number of the most recent Heading 2 is greater than the page number of the most recent Heading 1, use Heading2-Heading4, otherwise use Heading1 alone.
    Is this possible?
    Thanks in advance,
    Judith

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: conditional Styleref in header? (Word 2003)

    The one switch that seems to relate to the position of a STYLEREF field — p — doesn't seem to work correctly in a Header. Hmmm...

Posting Permissions

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