Using StyleRef in Headers

V

valsam

I have a document consisting of a series of lists, each headed by a
sub-title in the Heading 2 style, and each list may go over less or more than
one page. I use StyleRef to put these sub-titles in the page header, and
this works well until the last page of a multi-page list. That header shows
the sub-title of the next list instead of the current one when the next
sub-title is further down on the page. Is there any way round this? There
are no section breaks in this document, and I'm using Word 2000.
 
T

Terry Farrell

Have you checked out the optional switches you can add to the StyleRef
field? It sounds like that somehow you have managed to add the switch to
start searching from the bottom of the page to the top. By default (without
any switches) the StyleRef searches from top to bottom of a page.
 
S

Suzanne S. Barnhill

But StyleRef also picks up the first instance of the style on a page. It
will therefore NOT reflect an instance of the style on a previous page if
there is a paragraph in the referenced style on the current page.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
T

Terry Farrell

I slightly misunderstood, but re-reading it again I agree with you. The
StyleRef will pick up the styles from that page first regardless of the
direction of the search. So the only solution is to add the PageBreakBefore
attribute to the Heading 2 style so that new lists start on a new page.

Terry
 
V

valsam

That's what I suspected. I'd end up with too many unnecessary pages if I
added a page break before each one - I hoped that there was a way round this.
Oh well...
 

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