logo
search
VBA & Macro Problems

Fix Word VBA ContentControlOnExit Event Stopped Working

Maira MehtabMaira Mehtab Oct 9, 2026 868 views

Question details

A Word VBA document's ContentControlOnExit event stopped hiding and showing templates after functioning properly for over a year.

How to Fix Word VBA ContentControlOnExit Event Stopped Working
Product
Microsoft Word
Device & OS
not provided
Scenario
Using a Word document equipped with drop-down menus, bookmarks, and a VBA event to automatically show or hide specific templates based on user selection.
Observed behavior
The VBA event no longer triggers upon exiting the content control, meaning templates are no longer hidden by default, likely due to disabled macros or an Office update.
Before you start

Before troubleshooting macro settings, create a backup copy of your document to ensure your VBA code and bookmarks are safe while testing different solutions.

Solution 1Recommended

Enable Macros and Trust the Document

Check if a recent security update has disabled macros, which prevents the ContentControlOnExit event from running.

Microsoft frequently updates Office security settings, which can sometimes block macros in documents that previously worked without issue.

1
Open Trust Center Settings

In Word, click on 'File' > 'Options' and select 'Trust Center' from the left sidebar. Click the 'Trust Center Settings' button.

2
Verify Macro Settings

Navigate to the 'Macro Settings' tab. Temporarily select 'Enable all macros' to test if the event fires, or select 'Disable all macros with notification' so you can manually allow them when opening the document.

3
Add a Trusted Location

Go to the 'Trusted Locations' tab, click 'Add new location', and select the folder where your VBA document is saved. Click 'OK' to save your settings.

Enable Macros and Trust the Document
Unblock File Properties: If the file was downloaded or moved, right-click the document in Windows File Explorer, select 'Properties', and check the 'Unblock' box at the bottom of the General tab.
Free Microsoft Office alternative

Try WPS Office for Your Document Needs

If Microsoft Office updates continuously break your workflow or you need a reliable, lightweight alternative, WPS Office provides excellent compatibility with Word documents and supports advanced formatting features.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free installation package.
  2. 2. Install the Software: Run the installer and follow the quick on-screen instructions to set up the software.
  3. 3. Open Your Documents: Launch WPS Writer and open your .docx files to seamlessly continue your work.
Free and lightweight alternative to Microsoft OfficeHigh compatibility with Microsoft Word (.docx) formatsFamiliar user interface for a seamless transitionRobust document editing tools without unexpected update bugs
microsoft office alternative - wps office

Frequently Asked Questions

Why did my Word macro suddenly stop working?

Word macros often stop working due to recent Office security updates, changes in Trust Center settings that disable macros, or moving the document to an untrusted location. Ensure macros are enabled in the Trust Center.

Where should the ContentControlOnExit event be placed in VBA?

The Document_ContentControlOnExit event code must be placed within the 'ThisDocument' class module. It will not trigger if placed in a standard module.

How do I fix macros being blocked by security settings?

You can unblock macros by going to the document's file properties in Windows File Explorer, checking the 'Unblock' box at the bottom of the General tab, and then adding the file's folder to Word's Trusted Locations.