How to Block Office Macros from Internet Documents on Windows
Stop macro-based malware from running in downloaded Office files, and use Kudu to help strengthen Windows defenses.
By the Kudu Team
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →What Causes This?
Office macros are small scripts that can automate tasks in Word, Excel, and other Microsoft Office apps. The problem is that attackers often hide malicious macros inside documents downloaded from the internet, email attachments, or files extracted from ZIP archives. If Windows and Office don’t properly treat those files as coming from an untrusted source, the macro may still prompt to run or bypass safer defaults. Misconfigured Office trust settings, older Office versions, and weak Windows security policies all make this risk worse.
Common Symptoms
- Office shows a security warning asking whether to enable macros in a downloaded file
- A Word or Excel file opens with a yellow or red warning banner
- A document from email or the web tries to run code when opened
- You want to block all internet-downloaded macros before users can enable them
- Security scans or IT policies flag Office macro exposure as a risk
How to Fix It Manually
-
Make sure Office is fully updated
- Open any Office app like Word or Excel.
- Go to File > Account.
- Under Office Updates, click Update Options > Update Now.
- Newer Office versions are better at blocking macros in files marked as downloaded from the internet.
-
Check that the file is marked as coming from the internet
- In File Explorer, right-click a downloaded Office file and select Properties.
- In the General tab, look for a security message such as This file came from another computer.
- If you see an Unblock checkbox, leave it unchecked unless you fully trust the file.
- This “Mark of the Web” tag is what Office uses to identify internet-downloaded files.
-
Set Office to disable macros with notification or block them entirely
- Open Word or Excel.
- Go to File > Options > Trust Center > Trust Center Settings > Macro Settings.
- Choose Disable VBA macros with notification for a balanced setting.
- For stricter protection, enable the option that blocks macros from running in Office files from the internet if your Office version shows it.
- Repeat this in other Office apps you use.
-
Turn off risky trusted locations if they are not needed
- In the same Trust Center window, click Trusted Locations.
- Review the listed folders carefully.
- Remove any location you do not recognize or no longer need, especially folders that sync downloaded files.
- Files opened from trusted locations may bypass normal macro protections.
-
Use Group Policy on Pro or Enterprise editions
- Press Win + R, type
gpedit.msc, and press Enter. - Go to User Configuration > Administrative Templates > Microsoft Office and then open the policy area for the Office app you want, such as Word or Excel.
- Look for macro-related policies, especially settings to block macros from running in Office files from the Internet.
- Set the policy to Enabled, then click Apply and OK.
- Restart Office apps after changing the policy.
- Press Win + R, type
-
Avoid enabling content in downloaded files unless you verify the source
- If a document opens with Enable Content or Enable Macros, do not click it unless you are sure the file is safe.
- If the file is legitimate, save it from a trusted source, scan it with Microsoft Defender, and confirm with the sender before opening it again.
- This is the simplest way to stop macro-based malware infections.
Fix It Automatically with Kudu
Kudu can check Windows and Office security settings for weak macro protections, unsafe trust configurations, and other common gaps that leave downloaded documents risky. It helps apply safer settings faster, so you don’t have to dig through Office Trust Center menus or Group Policy by hand.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Block Outbound App Connections with Windows Firewall
Stop unknown apps from calling home by creating outbound firewall rules, and let Kudu help identify suspicious software.
How to Configure Windows Firewall to Block Unwanted Inbound Connections
Block risky inbound traffic with the right Windows Firewall settings and rules, and use Kudu to help tighten system security.
How to Fix Office Apps Slow to Launch on Windows
If Word, Excel, or PowerPoint take too long to start, startup components may be slowing them down, and Kudu can help.
How to Block Camera Access on Windows Globally and Per App
Protect your privacy by disabling webcam access system-wide or for specific apps, with Kudu helping review permissions.