the \l switch does not " tells it to pick up the last heading on the page ". It tells it to start the search for the style from the bottom of the page
backwards.
Instructs Word to search from the bottom of the current page, rather than from the top.
So, if I understand correctly...
Section 345.1 (Heading style)
345.1 paragraphs following
345.1 paragraphs following
PAGE BREAK
[highlight] 345.1 paragraphs following[/highlight]
345.1 paragraphs following
Section 345.2 (Heading style)
345.1 paragraphs following
345.1 paragraphs following
345.1 paragraphs following
Section 345.3 (Heading style)
345.3 paragraphs following
345.3 paragraphs following
Section 345.4 (Heading style)
345.4 paragraphs following
...for brevity, ignoring the MERGEFORMAT...
{STYLEREF "Heading 1"} {STYLEREF "Heading 1" \l}
produces
Section 345.
2 Section 345.4
Even though the first paragraph is from 345.1, it will NOT be picked up by STYLEREF, as it searches the
current page.
Unless there is not one. In which it will go back.
Section 345.1 (Heading style)
345.1 paragraphs following
345.1 paragraphs following
PAGE BREAK
[highlight] 345.1 paragraphs following[/highlight]
345.1 paragraphs following
etc. etc.
PAGE BREAK
In this case, yes, it will produce:
Section 345.
1 Section 345.1
but if there IS one, that is the one it will use.
So yes your page may very well start with a paragraph from 345.1, BUT, if there is a new Heading (345.2) on the current page, Word will not go back a page.
...which means that the page starts with a paragraph from Section 345.1, and the page ends on a paragraph from Section 345.4.
Except if the actual paragraph with the style (Section 345.1) is on th eprevious page, it will not be picked up, if there is a newer one on the current page. If there is no newer one on the current page, it WILL be picked up. I agree with macropod:
I think you'll have to accept that what you're seeing reflects the way STYLEREF fields are meant to work.
"A little piece of heaven
without that awkward dying part."
advertisment for Reese's Peanut Butter Cups (a chocolate/peanut butter confection)
Gerry