I cannot get the field code "styleref" to display the correct text in header on second page

I am working on improving the template for a document created by our company.  I have used "Style Ref" to get the document to fill in document title etc in the header. The problem appears when trying to get it to show the correct Revision and Revision date. The previous information shall not be deleted from the front page.  To give an example:

03 03.03.2015 Final
02 16.02.2015 Second Issue
01 30.01.2015 First Issue

All three instances of revision number is the same style  "Rev". 

Now comes the tricky part. The header on the front page is blank, and I am trying to get the header on the second page (and the rest of the document) to show text on the front page. This will not work as I want it to. It keeps showing the most recent use of the style "Rev", 01.  I want it to show the newest revision, 03. 

Is this in ANY way possible? (I am using word 2010)

Other information that might be relevant; 
The header on the front page is blank. As a test I tried to make the headers look the same and insert the StyleRef in the Front page header. In the Front page header it works "as it should", or in other words the inserted StyleRef inserts the first instance of "Rev", 03. (I.e. word is searching from top of page to bottom)When doing the exact same thing in the header on the second page, nothing happens. It does not want to find ANY of the instances of "Rev".

However I don't trust this to always be the case, as the multiple tests I have tried today have not always had the same outcome. Seems to be a bit buggy.

Someone please help! :)

A StyleRef will always reference the most recent instance of the referenced style, whether it is on the same or a previous page. Even if you had a header on the first page (which would show the first-occurring revision number and date, 03), subsequent pages would still reference the last instance (01).

In order to have the "Final" (03) revision number in your page headers,  you'll need to reverse the order of the table, which would seem more logical to me, anyway. In order to show both the revision number and the revision date, you will need to use different styles for the two items and have two StyleRef fields.

If standards don't permit reversing the order of the table, then apply the referenced styles to only the most recent revision number and date. Since this is a template, however, it seems like the natural action for a user creating/revising a document based on this template would be to add a row to the table for each revision. The table would then be in chronological order, the styles would persist throughout the table, and the StyleRef field would work as expected.

Microsoft MVP (Word) since 1999
Fairhope, Alabama USA
http://ssbarnhill.com
http://wordfaqs.ssbarnhill.com
Screen shots captured with TechSmith's Snagit

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

After several tests I can confirm that the Front page header and the Header work differently - the Front page header does the document search from top to bottom.

As other resources online also confirm you can change this to searching from bottom to top using field switches:

\l Inserts the last text formatted with the style on the current page instead of the first text formatted with this style
Microsoft Word searches the page for the style from bottom to top instead of from top to bottom (the default).

Why does the Header do the search from bottom to top by default, and as you also say reference the most recent instance of the referenced style? 

As I am working on a template, each person creating a document from this should not have to go into the formatting at all. Then it would be a lot easier to simply add the date & revision no. in the header manually ;-)

Still hoping the issue has a solution other than to change all of the company's templates in order to achieve this!

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

When there is an instance of the referenced style on the current page, Word will use the first instance of the style (top to bottom) unless the \l switch is used. On subsequent pages, Word will look back to previous pages for the most recent instance of the style, which in this case is the last instance on the first page. Indeed, if you want 03 to show on the first page using the 1, 2, 3 order as I suggested, you would have to use the \l switch. My apologies for the error.
Microsoft MVP (Word) since 1999
Fairhope, Alabama USA
http://ssbarnhill.com
http://wordfaqs.ssbarnhill.com
Screen shots captured with TechSmith's Snagit

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Suzanne, i'm using a Styleref field on the page, not in the header, and i want it to pick up the next instance of the style i.e. further down the same page but it always pick up the previous instance on the previous page even if i us the \l switch. Any
way you can think around this?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 4,212 Applies to: