Fix Word Mail Merge Shared Data Security Alert with VBA
Question details
The user wants to suppress the shared data security warning that interrupts a Word mail merge process when using VBA.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Executing a mail merge using VBA where fields pull shared data from a trusted OneDrive location.
- Observed behavior
- The Application.DisplayAlerts = False command fails to suppress the security prompt, causing repeated interruptions during the document merge.
Verify that your data source and mail merge template are saved locally in a designated Trusted Location within your Office Trust Center settings.
Use a Third-Party Mail Merge Add-in
Since Word VBA cannot reliably disable this specific security prompt without compromising application security, using a dedicated add-in is the most effective workaround.
Microsoft Word handles shared-data security warnings as critical alerts that bypass standard VBA suppression commands. Disabling broader Office security protections to avoid this prompt is highly discouraged as it leaves your system vulnerable.
Instead, utilizing a reputable third-party add-in (such as Merge Tools) allows you to merge records into individual Word or PDF documents externally, circumventing the repetitive security prompts entirely.
Locate and download a trusted utility like the Merge Tools Add-in to your computer.
Extract the downloaded ZIP file and follow the included documentation to install the add-in into your Microsoft Word startup folder.
Launch Word, navigate to the newly added Merge Tools tab, and use its custom merge options to generate your individual documents without triggering the native Word security alert.

Update Microsoft Word to Patch Known Bugs
Earlier versions and specific builds of Microsoft Word contained bugs that inadvertently triggered this security message. Updating Office may resolve the issue natively.
Experience Hassle-Free Mail Merge with WPS Office
If persistent VBA limitations and security prompts in Microsoft Word are disrupting your document automation, consider switching to WPS Office. It provides a highly compatible, lightweight alternative with an intuitive and stable built-in mail merge feature.
- 1. Download and install WPS Office: Get the free installation package from the official WPS website and complete the setup.
- 2. Open your template in WPS Writer: Launch WPS Writer and open your existing Word document and data source.
- 3. Use the Mailings tab: Navigate to the Mailings tab, click 'Open Data Source', and connect your file to easily complete your merge.

Frequently Asked Questions
Why doesn't Application.DisplayAlerts = False suppress this specific warning?
Microsoft Word classifies shared-data access warnings as critical security prompts rather than standard application alerts. To protect users from unauthorized data extraction, VBA's DisplayAlerts toggle is intentionally designed to ignore these specific security overrides.
Can adding my OneDrive folder to Trusted Locations fix this issue?
While placing both your document and data source in a Trusted Location resolves basic macro warnings, it often does not bypass the strict data-sharing security checks enforced during an active mail merge process.
Is it safe to use third-party mail merge add-ins?
Yes, reputable add-ins like Merge Tools are widely used and recommended within the Office professional community. They are designed to safely handle the merge process externally without forcing you to lower your overarching Office security settings.




