logo
search
Formatting Issues

How to Fix Word STYLEREF Headers Showing the Previous Chapter

Rana GarciaRana Garcia Oct 10, 2026 868 views

Question details

The user needs to correct STYLEREF fields in Word headers that incorrectly display the previous chapter's heading instead of the current one, particularly when a new part begins with a long introduction.

Product
Word
Device & OS
not provided
Scenario
Formatting a long document, such as a doctoral thesis, with different odd and even headers that use STYLEREF fields to reference part and chapter headings.
Observed behavior
When a new part begins with a long introduction, the odd-page header erroneously displays the chapter name from the preceding part because STYLEREF looks backward to find the last applied heading style.
Before you start

Ensure your document styles, such as Heading 1 and Heading 2, are accurately and consistently applied to your chapter titles before modifying the header field codes.

Solution 1Recommended

Use Bookmarks and REF Fields for Precise Header References

Replace the automatic STYLEREF field with a specific REF field linked to a bookmark, ensuring the header always references the correct chapter regardless of page distance.

STYLEREF searches for the nearest matching style and does not inherently understand part or chapter boundaries. Using a manual bookmark and REF field combination gives you absolute control over what is displayed in the header.

1
Bookmark the chapter heading

Select the text of your current chapter heading in the document body. Go to the Insert tab, click on 'Bookmark', name it (e.g., 'Chapter2'), and click 'Add'.

2
Access the header

Double-click the top margin of your document page to open the Header & Footer editing mode.

3
Insert the REF field

Delete the problematic STYLEREF field. Navigate to Insert > Quick Parts > Field. Select 'Ref' from the field names list, choose your newly created bookmark, and click OK.

Use Bookmarks and REF Fields for Precise Header References
Total Control Over Long Introductions: While this method requires you to manually insert REF fields at specific part boundaries, it completely prevents the header from reaching back to previous sections.
Professional Word Processor

Easily Format Thesis Headers with WPS Office

WPS Writer provides robust styling and field insertion tools, making it exceptionally easy to manage complex document headers, bookmarks, and cross-references for your thesis or dissertation.

  1. 1. Open your Document: Launch WPS Writer and open your thesis or dissertation document.
  2. 2. Create a Bookmark: Highlight your chapter title, navigate to the Insert tab, and select Bookmark to securely tag the heading.
  3. 3. Insert Field in Header: Double-click the header space, go to Insert > Field, and choose the REF field pointing to your bookmark to guarantee accurate chapter display on every page.
Fully compatible with Microsoft Word docx format and STYLEREF field codes.Advanced styling and bookmarking tools for precise document header control.Lightweight and incredibly fast, even when editing hundred-page doctoral theses.Free to download with an intuitive, familiar ribbon-based interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my STYLEREF field show the wrong chapter name?

STYLEREF searches the current page from top to bottom. If it doesn't find the specified style (like Heading 2), it looks backward to previous pages. If a new part has a long introduction without a Heading 2, the header will inevitably display the last Heading 2 it found from the previous chapter.

How can I force STYLEREF to search from the bottom of the page upwards?

You can add the '\l' switch to your STYLEREF field code (e.g., { STYLEREF "Heading 1" \l }). This forces the processor to search from the bottom of the page to the top, which is particularly useful for dictionary-style headers where you want to show the last item on the page.

Can I use STYLEREF with character styles instead of paragraph styles?

Yes. Creating a custom character style and applying it only to specific words allows STYLEREF to reference just that selected text. This provides granular control over what appears in your header, bypassing issues with entire paragraph styles spanning across unintended areas.