Fix Excel Trust Center Blocking Macros in Trusted OneDrive Files
Question details
The user is experiencing an issue where Excel continuously blocks macros in a workbook stored on a personal OneDrive, even after the folder has been added to Trusted Locations and macro security settings have been lowered.

- Product
- Microsoft Excel, OneDrive
- Device & OS
- not provided
- Scenario
- Opening and attempting to run a macro-enabled workbook that is stored and synced within a trusted personal OneDrive folder.
- Observed behavior
- Excel displays a security warning stating that not all content is allowed to run, effectively blocking the macros despite the trusted location configuration.
Ensure that your OneDrive client is fully synced and that you know the exact local path of your OneDrive folder. Verify that the file format is a macro-enabled workbook (.xlsm or .xlsb) before modifying your system's Trust Center settings.
Unblock the File via Windows Properties
Files synced from OneDrive or downloaded from the internet often carry a "Mark of the Web" (MOTW) that overrides Excel's Trust Center settings. Unblocking the file directly removes this restriction.
Microsoft's recent security updates strictly enforce MOTW on files originating from the internet or cloud storage. This means that even if a file is placed in a Trusted Location, Windows may still treat it as a potential security risk.
Open File Explorer and navigate to your local OneDrive folder where the affected Excel file is stored.
Right-click the macro-enabled Excel file and select "Properties" from the context menu.
In the "General" tab, look for a "Security" section at the very bottom. Check the box next to "Unblock".
Click "Apply", then click "OK" to close the dialog. Reopen the file in Excel to confirm the macros are allowed to run.

Allow Trusted Locations on Your Network
Excel may not automatically recognize the OneDrive sync folder as a safe local drive, requiring you to explicitly allow network locations.
Try WPS Office for a Smoother Spreadsheet Experience
If Microsoft Excel's strict macro blocking and complex OneDrive security policies are disrupting your workflow, consider switching to WPS Office. It offers a highly compatible alternative with a familiar interface, allowing you to manage your local and cloud files without overly restrictive hurdles.

Frequently Asked Questions
Why does Excel block macros even if the folder is in Trusted Locations?
Microsoft recently updated its security policies to block VBA macros by default in files originating from the internet or cloud services like OneDrive. This 'Mark of the Web' (MOTW) restriction is evaluated before local Trust Center settings, meaning it overrides them.
How can I permanently trust a file from OneDrive?
The most reliable way is to right-click the file in Windows File Explorer, select Properties, and check the 'Unblock' box in the General tab. This removes the internet origin flag from the file, allowing Excel to trust it.
Should I disable macro security entirely to fix this?
No, disabling macro security globally is highly dangerous and leaves your computer vulnerable to malicious code. Always use Trusted Locations, digitally signed macros, or manually unblock specific trusted files instead.
Does this issue happen with OneDrive for Business too?
Yes, both personal OneDrive and OneDrive for Business apply origin metadata to synced files. In business environments, your IT administrator may also enforce organizational security policies that further restrict macro execution.




