Fix the StyleRef No Style Name Given Error in Word Headers
Question details
The user needs to correct a StyleRef field that displays an error in a Word header or footer.

- 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.
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.
Correct the StyleRef field and update it
Use this method when an existing header or footer field does not specify the correct style name.
Select the title in the document body and open Home > Styles. Confirm that the intended style is applied and note its exact name.
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.
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.
Select the field and press F9, or right-click it and choose Update Field. Toggle field codes again if necessary to see the result.

Insert a new StyleRef field in the header or footer
Use a new field if the existing field code is difficult to correct.
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.

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.




