Automatically Update REF Fields When a Microsoft Word Checkbox Changes
Question details
The user needs REF fields nested inside IF fields to refresh when a checkbox changes, so conditional text reflects the current checkbox state.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A Word form uses a checkbox and conditional fields to display different text based on the checkbox state.
- Observed behavior
- Selecting a checkbox content control does not automatically refresh the dependent REF and IF fields.
In desktop Word, check whether the checkbox is a legacy form field or a checkbox content control under Developer > Properties. Confirm that manually updating the conditional field produces the correct text; these solutions refresh fields but do not repair incorrect bookmarks or IF conditions.
Update fields when leaving a checkbox content control with VBA
Use this method for a checkbox content control when the existing conditional fields work but do not refresh automatically.
The Document_ContentControlOnExit event runs when the user leaves the content control, not immediately when the checkbox is clicked. The document must retain its VBA code and run in a desktop Word environment where that code is permitted.
Select the checkbox content control and open Developer > Properties. Set its Title to a unique value, such as UpdateConditionalText. If Developer is hidden in Word for Windows, enable it under File > Options > Customize Ribbon > Developer.
Open Developer > Visual Basic. In Project Explorer, expand the current document and double-click ThisDocument. Paste this code, replacing UpdateConditionalText if you used a different title: Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) If ContentControl.Title = "UpdateConditionalText" Then ThisDocument.Range.Fields.Update End If End Sub
Choose File > Save As and select Word Macro-Enabled Document (*.docm). Keep the code in this document's ThisDocument module, rather than only in a local template, so it travels with the file.
Reopen the .docm file and allow its macros only if you trust the document and your organization's policy permits them. Change the checkbox, then click outside the control or press Tab to leave it. Check that the conditional text updates.

Enable Calculate on Exit for a legacy checkbox form field
Use this built-in setting if the checkbox is a legacy form field rather than a content control.
Use WPS Writer for everyday Word document editing
WPS Office is a free, lightweight alternative with a familiar interface and support for Microsoft Word formats, making migration straightforward for everyday editing. It does not fix Word's checkbox event behavior; keep the VBA-dependent form in desktop Word and verify specialized fields before switching editors.

Frequently Asked Questions
Why does clicking the checkbox leave the conditional text unchanged?
Word does not automatically refresh every REF or IF field when a checkbox changes. For a legacy checkbox, open its options and enable Calculate on exit. For a checkbox content control, use a Document_ContentControlOnExit event in ThisDocument and leave the control to trigger it.
Can I update the fields manually without adding a macro?
Yes. In desktop Word for Windows, click in the document body, press Ctrl+A, and then press F9 to update the selected fields. Fields in headers, footers, or other separate areas may need to be selected and updated separately. If the result is still wrong, check the referenced bookmarks and IF field logic.
Will the checkbox update as soon as I click it with this VBA code?
Not necessarily. Document_ContentControlOnExit runs when focus leaves the content control. After changing the checkbox, click outside it or press Tab. If you need an immediate response without leaving the control, this exit-event approach does not provide that behavior.
Is sending the DOCM file enough for the automation to work on another computer?
No. Use File > Save As > Word Macro-Enabled Document (*.docm) and store the event in that document's ThisDocument module. The recipient also needs desktop Word with VBA support, and security settings must allow the trusted macro. Word for the web does not run VBA; matching Office versions or cloud storage alone does not guarantee execution.
Where should I check if the event does not run?
Open Developer > Visual Basic and verify that the code is in the current document's ThisDocument module. Then open Developer > Properties for the checkbox and confirm that its Title exactly matches the title checked in the code. Also confirm the file is saved as .docm, macros are permitted, and you have moved focus out of the control.




