Results 1 to 2 of 2
2006-10-09, 22:51 #1
- Join Date
- Nov 2004
- Cherrybrook, New South Wales, Australia
- 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,
2006-10-10, 03:34 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 94 Times in 90 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...