Security Policy Errors

How to Fix Microsoft Blocked Macros in Untrusted OneDrive Excel Files

Aamir Naveed AkramAamir Naveed Akram Oct 28, 2026 869 views

Question details

The user is unable to run macros in an Excel workbook opened from a shared OneDrive folder because Microsoft considers the file untrusted and automatically blocks the macros.

How to Fix Microsoft Blocked Macros in Untrusted OneDrive Excel Files
Product
Microsoft Excel
Device & OS
Windows
Scenario
Opening a macro-enabled Excel workbook downloaded or synced from a shared OneDrive folder where Internet macros are blocked by default.
Observed behavior
Excel displays a security warning indicating that macros have been blocked because the source of the file is untrusted.
Before you start

Ensure that you completely trust the source of the shared OneDrive file, as malicious macros can pose a severe security risk to your computer and organization.

Solution 1Recommended

Unblock the File via Windows File Explorer

Use this method to manually remove the 'Mark of the Web' from a specific file, allowing Excel to trust it and run the included macros.

Microsoft blocks VBA macros in files originating from the internet by default. By modifying the file properties in Windows File Explorer, you can mark the workbook as safe.

1
Locate the file

Open Windows File Explorer and navigate to the shared OneDrive folder containing the blocked Excel workbook.

2
Open file properties

Right-click on the macro-enabled Excel file and select 'Properties' from the context menu.

3
Unblock the file

On the 'General' tab, look for the Security section at the bottom. Check the 'Unblock' box if it is available.

4
Apply changes

Click 'Apply' and then 'OK' to save your changes. Reopen the workbook in Microsoft Excel to run your macros safely.

Unblock the File via Windows File Explorer
File Unblocked: Once unblocked, the file is no longer treated as an internet download, and standard local macro security policies will apply.
Free Microsoft Office alternative

Edit Macro-Enabled Workbooks Seamlessly with WPS Office

If you frequently encounter restrictive Microsoft Office security policies that disrupt your workflow, consider switching to WPS Office. It provides a highly compatible, free, and lightweight alternative for editing Excel workbooks, including robust support for handling .xlsm files and VBA macros securely.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite on your computer.
  2. 2. Open your workbook: Launch WPS Spreadsheet and open your .xlsm file directly from your OneDrive folder.
  3. 3. Manage macros: Navigate to the Developer tab to seamlessly view, edit, and run your VBA macros.
Fully compatible with Microsoft Excel file formats (.xls, .xlsx, .xlsm)Built-in VBA macro support in the WPS Spreadsheet interfaceLightweight installation that consumes fewer system resourcesFamiliar user interface ensuring a zero-learning-curve migration
microsoft office alternative - wps office

Frequently Asked Questions

Why does Microsoft Excel block macros from OneDrive?

Microsoft automatically blocks VBA macros in files originating from the Internet to prevent malicious scripts from executing. Files synced from shared OneDrive locations often receive a 'Mark of the Web' tag, triggering this default security block.

What should I do if the Unblock option is missing in Properties?

If the Unblock checkbox is not visible on the General tab, the file might not have the Mark of the Web, or your organization's IT department is using centralized policies to strictly manage macro permissions. You will need to contact your IT administrator for assistance.

Can I add the shared OneDrive folder to Excel's Trusted Locations?

Yes, you can add specific folders to Trusted Locations within Excel's Trust Center. However, this may not override organizational security policies or the default Microsoft block for internet-sourced files, making manual unblocking the more reliable solution.