Document Editing Problems

Link Microsoft Word Header or Footer Text to Document Content

Jason MillerJason Miller Nov 22, 2026 870 views

Question details

Display a reference number or date from the document body in a Microsoft Word header or footer.

Link Word Header or Footer Text to Document Content
Product
Microsoft Word
Device & OS
not provided
Scenario
The user wants header or footer text to reflect information entered in the document body.
Observed behavior
A StyleRef field displays text associated with a selected document style in the header or footer.
Before you start

Identify the text you want to display and choose a style that distinguishes it from other document content. If you need both a reference number and a date, use a separate style for each.

Solution 1Recommended

Insert a StyleRef Field in the Word Header or Footer

Use this method to display styled text from the document body in a header or footer.

A StyleRef field retrieves text based on its style rather than linking to a specific location. If the same style is used for several entries, the displayed text depends on where Word finds a matching entry.

1
Style the source text

Select the reference number or date in the document body. On the Home tab, choose a suitable style from Styles, or create a distinctive style for that text.

2
Open the header or footer

Double-click the header or footer area, or use Insert > Header or Insert > Footer and choose an option to edit.

3
Insert the field

Place the cursor where the text should appear. In Word for desktop, select Insert > Quick Parts > Field, choose StyleRef, select the source text's style, and click OK.

4
Add another field if needed

To display a date as well as a reference number, insert a second StyleRef field and select the separate style applied to the date.

5
Update and check the result

After changing the source text, right-click the field in the header or footer and select Update Field. Check the displayed value, especially if the source style is used elsewhere.

Insert a StyleRef Field in the Word Header or Footer
Edit the source text: Change the reference number or date in the document body, not in the field result. The field displays the styled text; it is not a two-way editing link.
Free Microsoft Office alternative

Edit Word Documents with WPS Office

WPS Office is a free, lightweight alternative for editing documents in a familiar interface. Its Microsoft Office format compatibility helps you move existing files into WPS; verify StyleRef fields in Microsoft Word when their behavior is essential.

Edit document text, styles, headers, and footers in WPS Writer.Open and save documents in Microsoft Word formats, including DOC and DOCX.Use a familiar interface that makes it easier to move from Microsoft Office.Work with a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the StyleRef field show the wrong text?

The selected style may be applied to more than one entry. Apply a distinctive style to the intended source text using Home > Styles, then select that style in the StyleRef field.

How do I refresh the header after changing the reference number?

Open the header or footer, right-click the StyleRef field, and select Update Field. Check that the source text still has the style referenced by the field.

Can I show both a date and a reference number?

Yes. Apply a different style to each item in the document body, then insert a separate StyleRef field for each style through Insert > Quick Parts > Field.

Can I change the document body by editing the header field?

No. A StyleRef field displays styled source text. Edit the reference number or date in the document body and update the field if needed.