View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jean-Guy Marcil[_2_] Jean-Guy Marcil[_2_] is offline
external usenet poster
 
Posts: 373
Default Style ref in headers - can it work without using section breaks?

"ellinoz" wrote:

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.