logo
search
Document Editing Problems

Fix Bookmark Not Defined Error in a Word IF Field

Amos GikundaAmos Gikunda Sep 30, 2026 868 views

Question details

The user needs to resolve a 'Bookmark Not Defined' error that occurs when utilizing an IF field linked to a legacy drop-down form field, despite the referenced bookmark existing in the document.

How to Fix Bookmark Not Defined Error in a Word IF Field
Product
Word Processing
Device & OS
not provided
Scenario
Creating dynamic conditional text using IF fields combined with legacy drop-down form fields.
Observed behavior
The document displays a 'Bookmark Not Defined' error instead of evaluating the conditional logic and displaying the expected output text.
Before you start

Ensure you have field codes toggled on (by pressing Alt+F9) so you can directly view and edit the underlying syntax rather than the resulting error message.

Solution 1Recommended

Correct the REF Syntax and Rebuild the IF Field

Rebuild the field code properly using Ctrl+F9 to insert functional boundaries and ensure the reference command uses 'REF' instead of 'REV'.

The 'Bookmark Not Defined' error in this scenario typically happens for two reasons: typing the curly brackets manually instead of letting the software generate functional field braces, or utilizing incorrect reference codes. Rebuilding the code step-by-step guarantees it acts as a functional field.

1
Verify the bookmark name

Double-click your legacy drop-down form field to open the Drop-Down Form Field Options. Note the exact text in the 'Bookmark' field (e.g., ddsm1).

2
Insert outer field braces

Press Ctrl+F9 on your keyboard to insert the outer field boundaries { }. Do not type the curly brackets manually.

3
Type the IF command and insert nested braces

Inside the outer braces, type 'IF ' (with a trailing space). Then, press Ctrl+F9 again to generate a nested set of braces.

4
Insert the REF command

Inside the nested braces, type 'REF ddsm1' (replace ddsm1 with the bookmark name you verified earlier). Make sure you use 'REF' and not 'REV'.

5
Add the conditional statements

Click outside the nested braces but remain inside the outer braces. Type your conditional logic, for example: = "Car" "Applause" "Silence".

6
Update the field

Once your code reads { IF { REF ddsm1 } = "Car" "Applause" "Silence" }, highlight the entire field code and press F9 to update it. Press Alt+F9 to toggle off field codes and view the result.

Correct the REF Syntax and Rebuild the IF Field
Document Protection Requirement: Legacy form fields generally require document protection to function correctly. Go to the Developer tab, select Restrict Editing, and enable protection for 'Filling in forms' to ensure your drop-down selections update the IF field properly.
Seamless Document Editing

Create Conditional Text Fields Easily with WPS Writer

WPS Writer offers native support for complex field codes, legacy forms, and bookmarks, allowing you to build dynamic and responsive documents without encountering frustrating syntax errors.

  1. 1. Open your document: Launch WPS Writer and open the document containing your drop-down fields.
  2. 2. Access Field settings: Navigate to the 'Insert' tab, select 'Quick Parts', and click 'Field' to securely manage conditional rules.
  3. 3. Manage Bookmarks: Use the 'Insert' > 'Bookmark' functionality to visually track and edit existing drop-down references.
  4. 4. Toggle and Update: Use Alt+F9 to reveal your codes, make syntax adjustments, and press F9 to apply updates instantly.
Fully compatible with Microsoft Word field codes, bookmarks, and legacy form formats.Intuitive Quick Parts menu for easy field insertion and management.Seamless keyboard shortcut support (Ctrl+F9, Alt+F9) to toggle and build field codes accurately.Lightweight, fast, and completely free for standard document processing tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why does typing the { } brackets manually cause a Bookmark Not Defined error?

Manually typing curly brackets { } inserts them as standard text rather than specialized field boundaries. Word processing software requires you to press Ctrl+F9 to insert functional field boundaries, which instructs the program to interpret the enclosed text as an executable command.

How do I make my IF field update automatically when I choose a different drop-down item?

To force an automatic update, double-click the legacy drop-down form field to open its properties, and check the box that says 'Calculate on exit'. When you change the drop-down selection and tab out of the field, the IF field will refresh its result automatically.

What is the difference between REF and REV in field codes?

REF is the standard reference command used to insert the text represented by a bookmark. REV is not a valid field code for referencing drop-down bookmarks in this context, which is why using it will result in calculation errors or 'Bookmark Not Defined' messages.