Paragraph numbrs in header

A

AliceK

I'm working on a large document, and I want to be able to put the last
paragraph number used on every page in the header.

I have defined Heading one as my chapters titles, Heading 2,3 and 4 are in
the format 1.1, 1.1.1 and 1.1.1.1. I only need headings 2, 3, and 4 in my
headers.

I know how to insert the field STYLEREF "Heading 2" \l \n but this only
shows me the paragraph numbers for those headings which are H2.

Is there some way I can make the header display the paragraph number for
*whichever* heading level is at the bottom of the page, perhaps using
If..Then..Else?

Thanks,
Alice
 
J

Jean-Guy Marcil

AliceK said:
I'm working on a large document, and I want to be able to put the last
paragraph number used on every page in the header.

I have defined Heading one as my chapters titles, Heading 2,3 and 4 are in
the format 1.1, 1.1.1 and 1.1.1.1. I only need headings 2, 3, and 4 in my
headers.

I know how to insert the field STYLEREF "Heading 2" \l \n but this only
shows me the paragraph numbers for those headings which are H2.

Is there some way I can make the header display the paragraph number for
*whichever* heading level is at the bottom of the page, perhaps using
If..Then..Else?

I had a quick look and I do not think it is possible simply with fields.

Let's say you have nested IF fields to pickup headings numbers from Heading
2 to Heading 4.

Also, let's say you have a page like this:

____________________________
Text

Heading 2

Text

Heading 3

Text

Heading 4

Text

Heading 3

Text
_____________________________

There is no way to build the IF fields so that they pick up the last heading
3 on the page, but not the Heading 4. Also, let's say you have no heading 4
for the first few pages. There will be an error because Word will look for a
heading 4 if it is in the IF field construction (The \l switch tells Word to
start looking at the bottom of the page and go backward from there. it does
not stop at the top of the page though... It will keep looking backward until
it finds the target style). Finally, let's say that at the bottom of page 9
you do have a Heading 4 and the nested if Fields pick it up, but at the
bottom of page 10 you have a Heading 3 and no Heading 4 on that page, the
nested fields will pickup the last previous Heading 4 (on the previous page
in this case) and screw up the results.

There maybe a way around these problems, but right now, this being Friday
morning and all that, i can't think of a simple way... only complicated macro
code...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top