Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a Word document (2003) I'm using Header outlinining (where headings are put into the style Heading 1, Heading 2, Heading 3 and so on).

How do I put in the page header the current style header name (of any depth) like "Most Recent Header, continued"? I'd also like it to be blank if the page starts with a new header rather than continuing a previous one.

share|improve this question
up vote 2 down vote accepted

To insert a header (or footer) containing information from a styled heading, use a StyleRef field, for example:

{STYLEREF "Heading 1"}

would insert the text of the first Heading 1 on the current page. If no such style is found on the current page, it works backwards through the document to find the previous one, so this shows "chapter headings" quite successfully.

I recently wanted to do something similar to you so that I could show "Heading1 - Heading2" if there was a subsection on this page, but to suppress it if there was not. Unfortunately it would give me the last Heading2 from the previous chapter if there was none on this page, which was useless. I was not able to find a way to get behind this to find which page it was returning it from (to compare if it came from before the Heading 1, for example) or any other useful tricks. It was not important enough for me to bother spending too much time on so I gave it up and just showed Heading 1.

You might be able to get what you need by having an empty heading at the top of the page with another heading directly beneath it. Mark the first one as hidden text and it might still get picked up to create a blank header on the first page of the chapter and not on subsequent ones. You may need to also look at the options for the STYLEREF field so that it picks up the first occurence on a page rather than the last (which I seem to recall is the default).

share|improve this answer
Thank you. I think this will head me in the right direction. – ErikE Sep 26 '10 at 20:40

If I am understanding your question correctly. Open Format > Styles and formatting... and pick the formatting and click Modify. A new screen pops up where you can change the name of the heading or style.

To have a blank page before the header, click in the pop up screen Format > Paragraph go to tab Line and Page Breaks and select Page break before n

share|improve this answer
You're not understanding my question correctly. I'm expecting an answer that involves complex field code evaluations to place in the Page Header (View -> Header & Footer) the current header name. If, for example, the content of a section is longer than one page, "page break before" is hardly going to help on the second page, now, is it? – ErikE Apr 24 '10 at 6:27

My work around to do this is to add 'dummy' headings (same heading text but a different heading level) at the beginning and end of the section covered by that heading. Then use this heading level in the page header field. Don't forget to hide the dummy headings in your TOC. When you are finished editing modify the dummying heading formatting so they are invisible.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .