Forum Discussion
morrisandsons
Jun 11, 2026Copper Contributor
Macros blocked in shared OneDrive Excel workbook as untrusted source
I have a macro-enabled Excel workbook (.xlsm) stored in OneDrive and shared with another user. When they open the shared workbook in Excel Desktop, they receive the error: "Microsoft has blocked ...
NikolinoDE
Jun 14, 2026Platinum Contributor
You can add the folder as a trusted location, and it's a good first step. However, it's crucial to know that for files synced through OneDrive, this step alone is often not enough to bypass the security block.
You'll also need to address the "Mark of the Web" on the file itself.
Here are the steps to try, in order of effectiveness:
1. Add the Local OneDrive Folder as a Trusted Location
- The step:
- In Excel, go to File > Options > Trust Center > Trust Center Settings > Trusted Locations.
- Click "Add new location..." and browse to your local OneDrive folder path (e.g., C:\Users\YourUserName\OneDrive - YourCompany).
- In the pop-up, check the box that says "Subfolders of this location are also trusted" so it applies to all shared files within.
- Click OK to save.
2. Remove the "Mark of the Web" from the Specific File
This is the key step that addresses the core security block by telling Windows this specific file is safe.
- The step:
- Close the Excel file if it's open.
- Open File Explorer on your computer and navigate to your local OneDrive folder.
- Right-click on the .xlsm file and select Properties.
- On the General tab, at the bottom, check the box that says "Unblock".
- Click OK.
If the Unblock checkbox isn't there or the problem continues, it's time to try one of these more powerful solutions:
- Option A: Open from OneDrive in your Browser (Recommended)
The most reliable method is to always open the shared file by selecting "Open in Desktop App" from OneDrive online. - Option B: Add the Web Address as a Trusted Site (IT Admin Required)
This approach bypasses the security check for the entire cloud source. An IT administrator can add the Microsoft domain to the list of Trusted Sites using Group Policy. This effectively tells Windows to trust any file that comes from your organization's SharePoint or OneDrive. The domains to add are https://{your-domain-name}-my.sharepoint.com (for OneDrive) and https://{your-domain-name}.sharepoint.com (for SharePoint).
My answers are voluntary and without guarantee!
Hope this will help you.