VBA & Macro Problems

How to Stop Microsoft Word Security Prompts in Excel VBA Macros

Aamir Naveed AkramAamir Naveed Akram Nov 10, 2026 870 views

Question details

Stop security warning prompts when using an Excel VBA macro to copy linked content from a Word document to an Outlook email.

How to Stop Microsoft Word Security Prompts in Excel VBA Macros
Product
Microsoft Excel VBA
Device & OS
not provided
Scenario
An Excel macro is automating the process of copying content from a Microsoft Word document into a Microsoft Outlook email.
Observed behavior
A security warning is triggered because the Word document contains links, causing the macro automation to halt and wait for user confirmation.
Before you start

Before modifying your Microsoft Office security settings, verify that the macro and the linked Word documents originate from a fully secure and trusted source to prevent accidental execution of malicious code.

Solution 1Recommended

Store the Word Document in a Trusted Location

Designating the folder where your Word documents reside as a Trusted Location in the Trust Center is the safest and most reliable way to bypass security prompts without compromising overall security.

By setting up a Trusted Location, Microsoft Office automatically assumes any file opened from that specific directory is safe, bypassing standard link and macro warnings.

1
Open Word Options

Launch Microsoft Word, click on the File tab in the top-left corner, and select Options at the bottom of the menu.

2
Navigate to Trust Center

In the Word Options dialog box, click on Trust Center in the left-hand pane, then click the Trust Center Settings button on the right.

3
Add a New Trusted Location

Select Trusted Locations from the left menu, click the Add new location button, and browse to the folder containing your Word documents.

4
Include Subfolders and Save

Check the box for 'Subfolders of this location are also trusted' if necessary, click OK to confirm the new location, and click OK again to close the Trust Center.

Store the Word Document in a Trusted Location
Recommended Practice: Using Trusted Locations is officially recommended by Microsoft over disabling alerts or using unreliable workarounds.
Free Microsoft Office alternative

Try WPS Office for Seamless Macro Execution and Document Compatibility

If persistent Microsoft Office security prompts continue to disrupt your automated VBA workflows, consider switching to WPS Office. It offers robust VBA support, high compatibility with standard Office files, and an intuitive interface to streamline your macro operations without the hassle.

Highly compatible with Microsoft Excel (.xlsm) and Word (.docx) formats.Built-in VBA editor ensures your existing macros run smoothly.Lightweight architecture delivers fast loading times and reliable cross-application performance.Free to use with a familiar interface, requiring zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use Application.DisplayAlerts = False to bypass this Word security prompt?

No. While Application.DisplayAlerts works for standard application warnings (like confirming a deletion), it does not override security-level prompts generated by the Office Trust Center regarding external links or macro execution.

Why does a Word document with links cause a prompt in an Excel macro?

When Excel uses VBA to open a Word document, Word's security protocols independently check the document. If the document contains external links to other files or web data, Word halts to ask the user if those links should be updated or trusted, causing the automation to pause.

Are Trusted Locations secure to use?

Yes, provided you maintain strict control over what goes into the Trusted Location. You should only store files created by trusted sources in that folder, as any file in a Trusted Location bypasses standard Office security checks.

Does saving the file as an .xlsm macro-enabled workbook fix the warning?

No. Saving the Excel file in the correct macro-enabled format (.xlsm) is required to run the macro, but the security warning is originating from the Linked Data types inside the target Word document, which is assessed separately by the Office Trust Center.