Style ref in headers - can it work without using section breaks?

E

ellinoz

Hi,

We're trying to develop a template in Word using a styleref in the header.
This is to pick up each time the Heading 1 changes. Is it possible for the
headers to reflect the Heading 1 text without having section breaks in
between each? Every time I remove the section breaks it puts the very last
Heading 1 all through the document.

I realise that headers and footers generally only change per section but
wondered if this might be possible? We're trying to stop some of the
instability from having a lot of section breaks, and also can't be sure that
people will put in a section break before each heading 1!

Any help would be appreciated
 
J

Jean-Guy Marcil

ellinoz said:
Hi,

We're trying to develop a template in Word using a styleref in the header.
This is to pick up each time the Heading 1 changes. Is it possible for the
headers to reflect the Heading 1 text without having section breaks in
between each? Every time I remove the section breaks it puts the very last
Heading 1 all through the document.

Are you writing that you want a STYLEREF field to pick up only the first
HEADING 1 text in the document?
If so,this is not how STYLEREF fields work. By default they pick up the
nearest occurence of the style chosen in the field.

So, if you have a field {STYLEREF 1}, it will display the text from the
nearest previous Heading 1 paragraph.

If you really want a field to display only the first occurence of the
Heading 1 text in the document, either use a new style and use that instead
at that location, or use a character style on top of the Heading 1 style and
use that in the STYLEREF field, or use REF field with a bookmark at the first
heading 1 location.
 
E

ellinoz

Hi Jean-Guy,

The STYLEREF is in the header, relating to Heading 1s in the body of the
document. We are hoping that we can make it pick up each instance of the
Heading 1 as it flows through the document, without having to put in any
section breaks, so that if the heading on a page is 'Financials' then the
header will say that, and if the heading of the next page is 'Company
Overview' the header will say that, without using section breaks.

However, as it stands if there are 10 instances of Heading 1 in the
document, without section breaks it only picks up the last one and puts that
in all the headers.

Hope that makes sense. I have a feeling it goes entirely against the way
that Word headers work but just wondered if it's possible.
 
S

Suzanne S. Barnhill

That's not the way it should work. It should pick up the first instance of
the style on the page and keep that until another paragraph in that style
occurs. There is something wrong with the way your document is set up if
you're getting the result you describe. Possibly a slight difference in the
names of the styles applied?
 
E

ellinoz

Thanks Suzanne - I had hazy memories that it should do, but was confused why
it wasn't happening. I realised I had deleted all the section breaks and one
of the headers had static text, instead of a field in it. It had then flowed
up through the document and wiped out all my style references. In essence,
it was me being a bit of an idiot!

Thanks again
 
S

Suzanne S. Barnhill

Don't you love it when that happens? I think we all have our "D'oh!"
moments, and working with sections can create many of them.
 

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