How to Distribute Word VBA Macros and ActiveX Controls to Other Users
Question details
The user needs a reliable method to distribute a Word template containing VBA code and an ActiveX button to other users so the macros function correctly on their computers.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Sharing a Word document or template with embedded VBA macros and ActiveX controls (e.g., calling a Power Automate endpoint) with colleagues across an organization.
- Observed behavior
- The VBA code and ActiveX controls work locally on the author's computer but become unavailable, restricted, or fail to execute when the document is shared with other users.
Verify that your organization's IT security policies allow the execution of VBA macros and network endpoints, as these are frequently restricted on corporate devices.
Save and Distribute as a Macro-Enabled File Format
VBA macros cannot be saved in standard .docx or .dotx files. You must save and distribute the file using a macro-enabled format.
Standard Word documents strip out VBA code upon saving for security reasons. To ensure your macros travel with the document, you must utilize the specific file extensions designed to house them.
Click 'File' in the top ribbon and select 'Save As'.
In the 'Save as type' dropdown menu, choose either 'Word Macro-Enabled Document (*.docm)' or 'Word Macro-Enabled Template (*.dotm)'.
Click 'Save' and distribute this newly created .docm or .dotm file to your users instead of the standard document format.

Configure Trusted Locations for Shared Templates
To prevent Word from blocking macros on other users' computers, the shared template should be placed in a Trusted Location.
Replace ActiveX Controls with a Formatted MACROBUTTON
ActiveX controls are older technology and frequently blocked by security software. Using a formatted MACROBUTTON field is a safer, more reliable alternative that works identically.
Looking for a reliable, lightweight Microsoft Office alternative?
While advanced ActiveX controls are proprietary to the Microsoft ecosystem, WPS Office serves as a highly compatible, free alternative for standard document editing, offering seamless layout rendering without the heavy resource usage.

Frequently Asked Questions
Why do my Word macros disappear when I share the document with others?
Macros are automatically stripped from a file if it is saved in the standard .docx format. You must save the file as a Macro-Enabled Document (.docm) or Macro-Enabled Template (.dotm) to preserve and share the VBA code.
Are ActiveX controls safe to use in modern Word documents?
ActiveX controls are a legacy technology and are frequently restricted or entirely blocked by modern IT security policies due to potential vulnerability risks. It is highly recommended to use standard form controls or MACROBUTTON fields instead.
How do I trigger a macro without using an ActiveX button?
You can insert a MACROBUTTON field inside a standard Word shape. This creates a visually appealing, clickable element that triggers your specific macro without relying on legacy ActiveX technology.
What is a Trusted Location in Word?
A Trusted Location is a designated folder specified in the Word Trust Center settings. Files opened from these folders bypass standard macro security checks, allowing embedded VBA code to run automatically without prompting the user.




