SOLVED: Word Excel Error – Potentially Dangerous Macro Has Been Blocked

When launching an Excel file on local computer that that contains a macro, all works as expected. However, when running that same file from an network drive or an Azure file Share your macros don’t work and you see a SECURITY RICK banner stating “A potentially dangerous macro has been blocked“.

Fortunately, the fix is easy:


fix word excel potentially dangerous macro has been blockedfix word excel potentially dangerous macro has been blocked

This issue occurs because Microsoft has implemented security measures to block macros from files obtained from the internet or network locations in an effort to keep you safe. This includes Azure file shares.

Simply add the network location (which might be an on-prem server, DFS Share, or Azure File Share) as a Trusted Location:

  • Open Excel and go to File > Options > Trust Center > Trust Center Settings > Trusted Locations.
  • Click Add new location and enter the path to your Azure file share.

If that does not solve the problem make sure the file is not “blocked”:

  • Right-click the file in Windows File Explorer.
  • Select Properties.
  • On the General tab, check the Unblock checkbox and click OK

If you want to set this as a policy for all of your staff, create or modify a Group Policy:

  • On a Domain Controller, open the Group Policy Editor
  • Create and Edit a new GPO (or modify a current one)
  • Expand User Configuration > Administrative Templates > Microsoft Excel 2016 > Excel Options > Security > Trust Center.
  • Enable the policy Allow macros from network locations

Note: The “Allow Trusted Locations on my network” setting in Excel’s Trust Center can cover your corporate files and folders in Azure that you have mapped using a drive letter. When you add a network location as a trusted location, it includes any mapped drives that point to that network location. This means that your Azure file shares, once mapped to a drive letter, will be treated as trusted locations, allowing macros and other active content to run without being blocked


Published by
Ian Matthews