Effect of the STYLEREF field location

Where you insert the STYLEREF field determines the direction that Microsoft Word searches in for the style and thus can affect which text is inserted.

When you insert the field in:

Document text

Word searches for the closest text preceding the STYLEREF field. If the style isn't found, Word searches for the closest following text.

Footnotes, annotations, and endnotes

Word searches for the closest text preceding the footnote, annotation, or endnote reference mark in the document text. If the style isn't found, Word searches for the closest text following the reference mark.

Headers and footers (during printing)

Word searches for the current page, from top to bottom. If the style isn't found, Word searches next from the top of the page to the beginning of the document, and then from the bottom of the page to the end of the document.

If the \l switch is used, Word searches from the bottom of the page to the beginning and then the end of the document.

Headers and footers (when not printing)

Word searches for the section that contains the STYLEREF field, from the beginning. If the style isn't found, Word searches from the end of the section to the end of the document.