How to solve the problem that Word directory displays undefined bookmarks
"Error! Undefined bookmark" appears in the Word directory, usually because the bookmark pointed to by the page number field has been lost. This article explains how to determine the cause, update the domain, rebuild the directory, and gives preventive measures in order from the easy to the difficult.
Key points of this article
- "Error! Undefined bookmark" in the table of contents indicates that the _Toc bookmark pointed to by the page number field no longer exists. Most of the errors are not caused by the text itself.
- Back up first, then select all documents and press F9 to update the domain, and choose to update the entire directory. In most cases, it can be restored.
- If the error persists, press Alt+F9 to view the field codes, find the missing bookmark, then delete the old directory and reinsert it.
- Use the title style uniformly for chapter names. When merging documents or turning on revision editing, check again after updating.
After making a table of contents in Word, you may occasionally find that the page number position of some entries is displayed as "Error! Bookmark not defined.", and sometimes the entire table of contents is like this. This situation often occurs in papers, tenders, contracts and long reports: the document has been revised several times, or a section of content has been pasted from elsewhere, and the table of contents becomes "bad".
This article is written for those who have encountered this prompt and want to restore the directory as soon as possible. After reading, you will be able to determine the cause of the error, know which operations only need to be updated, which ones need to rebuild the directory, and avoid it from happening again.
The following method is based on the table of contents, fields and bookmark mechanisms that come with Word and does not depend on the menu position of a certain version. The shortcut keys and concepts mentioned in this article are common to common versions.
The directory shows undefined bookmarks, what should I do? One sentence conclusion
Direct answer: The essence of this prompt is that the bookmark pointed to by the page number field (PAGEREF) of the directory cannot be found. In most cases, updating the full-text field will allow Word to regenerate bookmarks; if the error still occurs after updating, it means that the directory structure has been damaged. It is more straightforward to delete the old directory and reinsert it.
| your situation | Recommended practices | reason |
|---|---|---|
| Only a few entries reported errors, and the title remained unchanged. | After selecting the directory, press F9 and choose to update the entire directory. | The bookmark may have been accidentally deleted or overwritten. Just regenerate it. |
| The entire directory reported an error | Select all documents and press F9, then update the entire directory | All page number fields are recalculated together, usually re-creating the _Toc bookmark |
| Still getting error after update | Delete the old directory and reinsert the automatic directory | The old directory's field code still points to a non-existent bookmark and can only be rebuilt |
| The error appears at the cross-reference in the text | Delete the reference and reinsert the cross-reference | The referenced bookmark has been deleted and the original reference cannot be restored. |
| Chapters merged from other files | Regenerate the table of contents after unifying the title style | Bookmarks and styles of two documents may conflict |
First determine what kind of problem it is
Before taking action, please check your situation with the table below to avoid wasted effort.
| symptoms | Common causes | How to confirm |
|---|---|---|
| "Error! Undefined bookmark" is displayed at the table of contents page number. | The _Toc bookmark pointed to by the page number field is missing | Press Alt+F9 to display the field code and check whether the bookmark after PAGEREF exists |
| Appears after modifying a title | When changing the title, the original paragraph was deleted and the bookmarks were lost. | Check the style of the title to confirm that it is still Title 1, Title 2, etc. |
| Appears only in a certain chapter, other chapters are normal | This chapter is pasted from other documents, bringing in incomplete domains | Compare the domain code and style of this chapter with other chapters |
| Appears in cross-references in the main text | The cited title or bookmark has been removed | Check the REF field in the main text to confirm whether the referenced bookmark is still there |
| It only appears after the revision is enabled | The title was removed in the revision, and the bookmark was not retained | Close revisions, accept or reject relevant revisions, and then update them |
| I only discovered this after exporting the PDF | No domain was updated before export | Open the original file to check, then export after updating |
Inspect and fix each item one by one
- Back up files. Save a copy before operating to prevent further damage caused by misoperation.
- After selecting all documents, update the domain. Press Ctrl+A to select all, then press F9. When the option pops up, "Update page numbers only" will retain the text of the directory entries you manually edited, while "Update the entire directory" will regenerate all entries. First, try "Update page numbers only"; if that doesn't work, select "Update entire directory".
- Check the title style. Make sure each chapter title uses built-in styles such as Title 1 and Title 2. Ordinary text with bold or enlarged font size to fake titles makes the table of contents unrecognizable and does not generate correct bookmarks.
- Check the domain code. Press Alt+F9 to switch to the domain code view, find the error location, and look for the book signature starting with _Toc after the PAGEREF. After viewing, press Alt+F9 again to switch back to normal view.
- Check hidden bookmarks. In the Insert Bookmark dialog box, check "Hide Bookmark" to see if the corresponding _Toc bookmark exists. If it does not exist, it means the bookmark is missing, so proceed directly to the next step.
- Delete the old directory and reinsert it. Select and delete the entire directory, then reinsert the automatic directory into the directory entry of the ribbon. When rebuilding, Word generates new bookmarks, and errors usually disappear accordingly.
- Fix cross-references. If the error appears in the main text, delete the error cross-reference, reinsert the cross-reference where needed, and select the corresponding title or number.
- Fully updated and verified again. Select all and press F9, compare page by page with the main text to confirm no residual error text.
How to Prevent It from Happening Next Time
- Write chapter titles in the title format. The table of contents and page numbers rely on title style generation; do not use bold or renumbered fonts.
- Modify the title within the original paragraph. When modifying text, try to edit the original paragraph directly to avoid deleting entire paragraphs and retyping, which is less likely to lose related bookmarks.
- When pasting from other files, first standardize the format. First apply the same title style in the target document, then paste the content, and update the domain once after pasting.
- Before merging multiple documents, standardize numbering and formatting. After merging, update the domain in full, then check the table of contents and cross-references.
- Revisions are handled first during editing. Before updating the table of contents, accept or reject all revisions to avoid titles being deleted and then restored during revision.
- Perform a regular inspection before delivery. Select All and press F9 to check the table of contents and cross-references, and after confirming everything is correct, export the PDF or print.
- Long documents are regularly copied. If an exception occurs, you can revert to the previous normal version, reducing the workload of redos.
❓ Frequently Asked Questions (FAQ)
1. Why do errors still appear after updating the domain?
This usually indicates that the directory's domain code or title structure is corrupted, and updates only require page numbers to be recallocated, making it impossible to recover lost bookmarks. Deleting the old directory and reinserting it usually solves the problem.
2. Is it possible to simply delete these bookmarks to solve the problem?
It is not recommended to delete them arbitrarily. Directory dependencies on hidden bookmarks starting with _Toc record the title position; deleting them will actually cause errors. When organizing bookmarks, only delete those you added and confirmed as useless.
3. The page numbers look correct, but it still shows undefined bookmarks. Is that a big deal?
Handle it. When readers open the file, they will see incorrect text, but these words will be retained after printing or exporting the PDF. Even if the page numbers are correct, the table of contents should be rebuilt.
4. What should you do if this prompt appears when opening an online conversion website or other software?
During the conversion process, domains and bookmarks may not be fully retained. It is recommended to go back to the original Word file to repair it, convert it again, and check whether the converted directory is normal.
📝 Summary
Word directory shows undefined bookmarks, mostly missing bookmarks pointing to page number fields. Back up first, then select all and press F9 to update the directory; If not, check the title style, review the domain code, and if necessary, delete the old directory and reinsert it. Developing the habit of unifying title styles and exporting the updated domain before export can significantly reduce such problems.


