Display outline (heading style output) in header

M

mrken

I have formatted my dissertation with heading styles so as to show where in the argument I am. E.g
Heading
Heading
Heading
Heading
Heading
Heading
Heading
etc
Plus I've outline numbered each heading style





etc

What I want to do is to output both the number and text of the heading at the top of each page (in the header) but I only want it to show where in the outline one is as of the beginning of that page. So far what I've done is Insert, Field, StyleRef (Header 1 with paragraph # -- which outputs ONLY the outline number of the level -- then again without paragraph # to get the text)
So the code in the header looks like this
{STYLEREF "Heading 1" \n \*MERGEFORMAT}. {STYLEREF "Heading 1" \*MERGEFORMAT
{STYLEREF "Heading 2" \n \*MERGEFORMAT}{STYLEREF "Heading 2" \*MERGEFORMAT
{STYLEREF "Heading 3" \n \*MERGEFORMAT}{STYLEREF "Heading 3" \*MERGEFORMAT

Here's the problem (if you haven't already figured it out): I can't figure out how to make the output conditional to the point in the text I want referenced. For example, if I put the three heading levels in the header I get three levels on every page -- even the pages that aren't yet into the third level. If page 2 is only up to Heading 1 and Heading 2 levels, then I only want those to appear. I think I need to use an 'if' formula of some kind, but haven't been able to find any guidance about how to do this. Also, some fields that I initially thought promising (like monkeying with making an index or something) report that they are only usable in the main document. When I describe what I want to do, people say that it sounds like it should be pretty easy and straightfoward, but I'm having a devil of a time figuring it out

Many thanks

Ken
 
Top