How to Display Chapter Headings in a Word Header Automatically
Question details
The user wants to dynamically display chapter titles (formatted as Heading 1) in the document header without experiencing incorrect numbering on every page.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Setting up headers for a multi-chapter document or book where the header automatically reflects the current chapter's title.
- Observed behavior
- Attempting to use predefined Header templates resulted in the number 2 appearing incorrectly on every page instead of updating dynamically based on the chapter.
Ensure your document chapters are consistently formatted using built-in heading styles (such as Heading 1) before configuring dynamic headers.
Insert a STYLEREF Field Manually in the Header
The most reliable way to display dynamic chapter titles is by manually inserting a STYLEREF field rather than relying on predefined Header Quick Parts that may contain hardcoded elements.
Choosing a predefined header format is different from explicitly inserting the STYLEREF field. Predefined layouts can sometimes force incorrect numbering. Manually adding the field ensures it cleanly references the text of your chosen heading.
Double-click the top margin of any page in your document to open the Header & Footer editing area.
Place your cursor exactly where you want the chapter title to appear. You can use the default center and right tab stops in the header paragraph for alignment.
Navigate to the Insert tab, click on Quick Parts, and explicitly select 'Field' from the drop-down menu.
In the Field dialog box, select 'StyleRef' from the Field names list. Under Field properties, choose 'Heading 1' and click OK.
To include a page number alongside the heading, place the cursor where desired and press Alt+Shift+P.

Set Up Different Header Layouts for Chapters
Customize your layout so that headers behave correctly across different sections, such as omitting headers on chapter title pages or alternating left and right pages.
Easily Format Dynamic Headers with WPS Writer
WPS Writer provides a powerful, highly compatible environment for managing complex headers, footers, and reference fields. You can effortlessly set up dynamic chapter headers using the StyleRef field in a familiar, user-friendly interface.
- 1. Apply Styles: Open your document in WPS Writer and apply 'Heading 1' styles to all your chapter titles.
- 2. Access Header: Double-click the top area of your page to activate the Header and Footer tab.
- 3. Insert StyleRef Field: Go to the Insert tab, click on Field, select 'StyleRef' from the list, and choose 'Heading 1'.
- 4. Customize Layout: Use the Header and Footer ribbon to easily toggle options like 'Different First Page' or 'Different Odd and Even Pages'.

Frequently Asked Questions
Why is my header showing the wrong chapter number on every page?
This usually happens if you inserted a predefined header template that includes hardcoded numbering, or if your heading isn't properly linked to a multi-level list. Manually inserting a STYLEREF field directly into the header ensures it pulls the actual text of the heading currently active on that page.
What does the STYLEREF field actually do?
A STYLEREF field is a dynamic code that searches the current page for text formatted with a specific style (like Heading 1). If it finds it, it displays that text in the header. If it doesn't find it on the current page, it looks backwards through the document to display the most recent heading of that style.
How do I add page numbers next to my dynamic chapter heading?
While editing your header, position your cursor where you want the number to appear (using the Tab key to align it to the right or center), and press the shortcut Alt+Shift+P to insert a dynamic page number field without overwriting your chapter title.
Can I hide the chapter title on the very first page of the chapter?
Yes. You must first ensure that each chapter starts with a Next Page Section Break. Then, double-click the header area of that chapter and check the 'Different First Page' option in the Header & Footer menu. This allows you to leave the first page header blank while subsequent pages display the STYLEREF field.




