Expert guide
Excel Macros Blocked: 'The Source of This File Is Untrusted'
Why Office blocks macros in downloaded and emailed files, and how to run trusted ones safely
Call us at +1 (385) 386-3860
Short answer: the red "SECURITY RISK: Microsoft has blocked macros from running because the source of this file is untrusted" bar appears because the workbook came from the internet (email, download, some cloud links) and carries a Mark of the Web. For a file you trust: save it locally, close it, right-click → Properties → tick Unblock → OK, and reopen. For internal tools, keep them in a Trusted Location or an internal share recognised as intranet. If you need help across your team, see Excel troubleshooting.
Since Microsoft changed the default in 2022, macro-enabled workbooks that arrive by email or download no longer show an "Enable Content" button. Instead, macros are simply blocked. This stopped a major malware route, and it also stopped many legitimate business tools: the monthly template from head office, the supplier's order form, the macro a consultant emailed. The fix depends on where the file came from and whether you trust it.
What Mark of the Web Is
When a browser or email client saves a file from the internet, Windows attaches a small hidden marker (an alternate data stream called Zone.Identifier) recording that it came from the Internet zone. Office reads that marker. Files from the internet with macros are blocked unless the file has been explicitly unblocked or is opened from a location trusted by policy.
Fix 1: Unblock a Single Trusted File
Save the attachment or download to a folder on your PC (not opened from the email preview).
Close the workbook if it is open.
In File Explorer, right-click the file → Properties.
On the General tab, tick Unblock next to the security message, then OK.
Open the file and click Enable Content if prompted.
If the workbook arrived inside a ZIP file, unblock the ZIP before extracting; otherwise every extracted file keeps the mark.
PowerShell alternative (for files you trust): Unblock-File -Path "C:\Users\you\Documents\Monthly Template.xlsm" For a whole folder of trusted files: Get-ChildItem "C:\Tools\Templates" -Filter *.xlsm | Unblock-File
Fix 2: Trusted Locations for Your Own Tools
Workbooks your team uses every day should not travel by email. Store them in a folder defined as a Trusted Location (File → Options → Trust Center → Trust Center Settings → Trusted Locations), deployed to everyone by IT. Files opened from a trusted location are allowed to run macros. For network folders, the "Allow Trusted Locations on my network" option must be enabled.
The registry and Group Policy approach is the same as for Access; see setting trusted locations.
Fix 3: Intranet and SharePoint Sources (IT)
Files from internal file servers are usually not marked. If they are, adding the server to the Local intranet zone stops them being treated as internet files.
Files opened from OneDrive or SharePoint in your own tenant are generally treated differently from internet downloads, but downloading a copy through a browser can still mark it.
Group Policy can define how macros in internet files are handled; changing it organisation-wide is a security decision for IT.
Which Situation Are You In?
| Situation | Best response |
|---|---|
| Unexpected macro attachment | Do not unblock. Verify with the sender by phone; treat as suspicious |
| Trusted supplier or head office template | Unblock once, then store in a trusted internal location |
| Your team's internal tool emailed around | Stop emailing it; host it in a trusted folder or SharePoint |
| Downloaded template from a website | Unblock only if you trust the publisher; inspect the VBA first |
| No Unblock checkbox and still blocked | Policy blocks macros; ask IT |
Reduce Your Dependence on Macros
A lot of what macros do in business workbooks is data preparation, which Power Query handles without any macro security issues because it works in ordinary .xlsx files. Moving those steps out of VBA means fewer blocked files and less support. The decision guide is in Power Query vs VBA, and cloud automation without VBA in Office Scripts vs VBA.
Before You Unblock: Check the Code
Open the VBA editor (Alt+F11) with macros still disabled and read the modules.
Look for code that runs on open (Workbook_Open, Auto_Open).
Be wary of Shell, CreateObject("WScript.Shell"), URLDownloadToFile, or obfuscated strings.
If in doubt, do not enable it; ask someone who reads VBA.
AI can help explain unfamiliar macro code before you trust it; see using AI with Excel VBA.
FAQ
Blocked Excel macros FAQ
Mark of the Web, unblocking and policy