Document Editing Problems

Fix the StyleRef No Style Name Given Error in Word Headers

Steven ParkerSteven Parker Nov 13, 2026 870 views

Question details

The user needs to correct a StyleRef field that displays an error in a Word header or footer.

Fix the StyleRef No Style Name Given Error in Word Headers
Product
Microsoft Word
Device & OS
not provided
Scenario
A StyleRef field is intended to display a document title in a header or footer.
Observed behavior
The field displays “Error! No style name given” instead of the title.
Before you start

Select the document title and check its applied style in the Home tab’s Styles gallery or Styles pane. Note the exact style name; Book Title may be a custom style or may not be available in your Word version.

Solution 1Recommended

Correct the StyleRef field and update it

Use this method when an existing header or footer field does not specify the correct style name.

1
Check the title style

Select the title in the document body and open Home > Styles. Confirm that the intended style is applied and note its exact name.

2
Show the field code

Double-click the header or footer, then toggle field codes with Alt+F9 on Windows or Option+F9 on Mac. Some keyboards require the Fn key as well.

3
Correct the style name

Edit the field code so it names the applied style exactly. For example, use { STYLEREF "Book Title" } if the title uses the Book Title style. Keep the existing field braces rather than typing ordinary braces.

4
Update the field

Select the field and press F9, or right-click it and choose Update Field. Toggle field codes again if necessary to see the result.

Correct the StyleRef field and update it
Style not available?: Apply an existing style to the title or create one through the Styles pane, then use that exact style name in the field.
Free Microsoft Office alternative

Edit Word Documents with WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface for editing documents and moving existing Office files into a new workflow. It does not repair Word’s StyleRef field error.

Edit document titles, headers, and footers in WPS WriterOpen and save Microsoft Word DOC and DOCX filesUse a familiar interface for a smoother transition from OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does my StyleRef field say no style name was given?

The field may be missing its style name or contain an incorrectly entered code. Toggle field codes and check that the field includes a style name, for example { STYLEREF "Book Title" }.

How do I check which style my title uses?

Select the title in the document body and check the highlighted style in Home > Styles or the Styles pane. Use that exact name in the StyleRef field.

What if Book Title is not available in Word?

Book Title may not exist in your version or document. Choose an existing style for the title or create one in the Styles pane, then reference its exact name in the field.

Why do typed braces not create a working field?

Word requires special field braces. Insert them with Ctrl+F9 on Windows or Command+F9 on Mac, enter the field code inside them, and press F9 to update the field.