A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
To stop Excel from disabling macros in files that are trusted, use one of the supported trust paths below.
- Put the file in a Trusted Location.
- In Excel, go to File > Options > Trust Center > Trust Center Settings > Trusted Locations.
- Add the folder that stores the workbook.
- If needed, enable subfolders for that location.
- Warning: every macro-enabled file in that trusted folder can run, so use only folders that are tightly controlled.
- Remove Mark of the Web from the file if it came from the internet.
- In File Explorer, right-click the file > Properties.
- On the General tab, select Unblock if it appears, then apply the change.
- This removes the internet mark from the file.
- PowerShell can also remove it with
Unblock-File.
- Use a Trusted Publisher certificate for signed macros.
- If the macro is digitally signed and the device trusts that publisher certificate, Office opens the file with macros enabled.
- For files stored in OneDrive or SharePoint, avoid downloading them in a way that adds Mark of the Web.
- Use Open in Desktop App from OneDrive or SharePoint.
- If the OneDrive sync client downloads the file, the file won’t have Mark of the Web.
- Files in synced Windows known folders such as Desktop or Documents also don’t have Mark of the Web.
- For groups that must use macro files from SharePoint or OneDrive, admins can add those domains to Trusted Sites.
- Use the Site to Zone Assignment List policy.
- Add the SharePoint or OneDrive domain to the Trusted Sites zone.
- Warning: users downloading files from those domains bypass the default macro block, so access control on those sites becomes more important.
- Check macro-blocking policy if macros are still disabled.
- The policy Block macros from running in Office files from the Internet overrides normal Trust Center behavior for internet-marked files.
- If that policy is Enabled, macros from internet-marked files are blocked.
- If it is Disabled, Office respects File > Options > Trust Center > Trust Center Settings > Macro Settings, and users can get the older Enable Content warning flow.
- If it is Not Configured, users are blocked from running macros in files obtained from the internet and see the Security Risk banner.
- If the file was already trusted before the newer default behavior change, macros can continue to run because the file is treated as a Trusted Document.
If the goal is to keep macros enabled only for known-safe files, the best options are:
- store them in a Trusted Location
- Unblock the specific file
- use digitally signed macros
- for SharePoint/OneDrive, open with Open in Desktop App or use the sync client