Styleref works in all headers but first

K

kscorbet

I have a protected form and I used STYLEREF to plug the contents of one of
the form's fields into the page header. However, it goes into all the
headers but the one on the first page (which was the one I applied it to). I
do not have Different First Page set anywhere. It does work in all page
headers if I unprotect the document. This is Word 2003. Any ideas?

- Kelly
 
S

Suzanne S. Barnhill

If a StyleRef field is blank on the first page it can sometimes be because
an empty paragraph has become formatted in the referenced style. This can be
easy to miss in a table, where rows can be set to an exact height and text
that doesn't fit may be hidden from the user but still visible to Word.
 
K

kscorbet

That appears to have been it... not that I found the empty paragraph in
question, but I recreated it from the beginning and it now works.

My next question is whether you can get it to work with new headers that get
created during entry of data into the form? There is a section that is
unprotected where free text is allowed and if enough is entered to create a
new page, the header on that page does not contain the desired data via
STYLEREF.

- Kelly
 
S

Suzanne S. Barnhill

The way StyleRef fields work by default is that they pick up the most recent
occurrence of a given style, even if it's on a previous page, and this works
even in protected forms (luckily, since ordinary REF fields don't), but if
the new page perhaps contained an empty paragraph in the nominated style...
I think you have to be very careful to reserve the particular style for only
the text to be referenced. Often a character style is more suitable for this
purpose than a paragraph style, as it can be applied to just the text form
field itself and nothing else in the document.
 
Top