Fix Word VBA Font TextColor Triggers ContentControlOnEnter
Question details
The user needs to prevent the Document_ContentControlOnEnter event from firing unexpectedly when reading or changing the Font.TextColor property in a Word VBA macro.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Modifying or reading font color properties within Content Controls using VBA macros in Microsoft Word.
- Observed behavior
- Reading or changing ContentControl.Range.Font.TextColor triggers the Document_ContentControlOnEnter event, whereas using the older Font.Color property does not.
Ensure you have saved your macro code and test the VBA script on a duplicate document to avoid accidental changes to your production files during troubleshooting.
Use Font.Color as a Workaround
Bypass the event-triggering bug by using the older Font.Color property instead of Font.TextColor.
Since the Font.TextColor property appears to have a native event-handling bug in Microsoft Word, switching to the legacy Font.Color property usually achieves the desired visual outcome without accidentally triggering the Document_ContentControlOnEnter event.
Press Alt + F11 in Microsoft Word to open the Visual Basic for Applications (VBA) editor.
Find the specific macro or module where you are attempting to modify or read the ContentControl.Range.Font.TextColor property.
Change 'Font.TextColor' to 'Font.Color' in your script. For example, use 'ContentControl.Range.Font.Color = wdColorRed' or apply a specific RGB value.
Save your code, return to your Word document, and run the macro to verify that the color changes without triggering the OnEnter event.

Report the Bug to Microsoft
Report this specific VBA behavior directly to Microsoft to help developers investigate and patch the native Word bug.
Try WPS Office for Your Document Needs
If native macro bugs in Microsoft Word are slowing down your workflow, consider using WPS Office. It provides a highly compatible, lightweight, and free alternative with a familiar user interface that makes switching effortless.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button.
- 2. Install the Software: Run the downloaded installer and follow the on-screen prompts to set up WPS Office on your device.
- 3. Open Your Documents: Launch WPS Writer and open your existing Word documents to continue your work without formatting loss.

Frequently Asked Questions
What is the difference between Font.Color and Font.TextColor in Word VBA?
Font.Color is a legacy property that accepts basic RGB values and standard wdColor constants. Font.TextColor is a newer object designed to support complex theme colors and tints, but it is currently known to cause unexpected event triggers in some Word versions.
Why does changing text color trigger the ContentControlOnEnter event?
This is likely due to an internal bug in Word's event-handling model. Modifying the newer Font.TextColor property inside a Content Control causes Word to mistakenly register the programmatic interaction as a user entering the control.
Is there an Application.EnableEvents property in Word VBA to temporarily stop this?
Unlike Excel VBA, Word VBA does not have an Application.EnableEvents property to disable events globally. To bypass event loops, you must declare a global boolean flag (e.g., bDisableEvents) and wrap your event code in an 'If Not bDisableEvents Then' block.




