How to Fix Word Caption Error for Custom Heading Styles
Question details
The user wants to resolve a caption numbering error that occurs when linking a figure caption's chapter number to a custom heading style.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Adding a figure caption that includes a chapter number derived from the document's heading.
- Observed behavior
- Word displays the message 'Error! No text of specified style in document' instead of the caption number because it cannot process custom heading styles for this feature.
Verify which heading styles are currently applied to your chapter titles by highlighting the text and checking the Styles pane in the Home tab.
Replace Custom Headings with Built-in Heading Styles
Word's caption chapter numbering only works with its default built-in heading styles (Heading 1 through 9). You must replace your custom styles with built-in ones to generate the captions correctly.
By design, the 'Include chapter number' feature in Word's Caption dialog is hardcoded to look for standard built-in heading styles. If you created a custom style (e.g., 'MyChapterStyle'), Word cannot link the numbering to it. You can easily fix this by applying a built-in heading style and modifying its appearance to match your original custom design.
Select the text of your chapter heading. Go to the 'Home' tab, locate the 'Styles' group, and click on 'Heading 1' (or another built-in heading level).
To keep your preferred formatting, right-click 'Heading 1' in the Styles gallery and select 'Modify'. Adjust the font, size, and color to exactly match the look of your old custom heading style, then click 'OK'.
Click where you want the figure caption to appear. Go to the 'References' tab and click 'Insert Caption'. In the dialog box, click the 'Numbering' button.
Check the box for 'Include chapter number'. In the 'Chapter starts with style' dropdown menu, select the built-in heading style you just applied (e.g., Heading 1), choose a separator, and click 'OK'.
If the error still displays on existing captions, press 'Ctrl + A' to select the entire document, then press 'F9' to force an update of all field codes. The error message will be replaced by the correct caption numbers.

Create Professional Documents and Manage Captions Easily with WPS Office
Looking for a simpler way to manage document formatting, heading styles, and figure captions? WPS Office provides a lightweight, highly compatible alternative to Microsoft Word, allowing you to create complex documents with ease and zero cost.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite.
- 2. Open your document: Launch WPS Writer and open your existing Word document to continue editing without losing formatting.
- 3. Manage captions: Navigate to the 'References' tab in WPS Writer to seamlessly insert captions and cross-references.

Frequently Asked Questions
Why do I get the 'Error! No text of specified style in document' message?
This error occurs when Word attempts to generate a dynamic number or reference using a specific style that either does not exist in the document or is not supported by the feature. For captions, it happens if you try to link chapter numbers to a custom heading style instead of a built-in one.
Can I force Word to use my custom styles for chapter numbers in captions?
No, Word's built-in caption numbering feature exclusively supports the default built-in heading styles (Heading 1 through Heading 9). You must map your chapter numbers to one of these built-in styles to use the 'Include chapter number' functionality.
How do I update all caption fields in my document at once?
Press 'Ctrl + A' on your keyboard to select the entire document, then press the 'F9' key. This forces Word to refresh all fields, which will clear residual error messages and display the correct updated caption numbers.




