Fix Microsoft 365 Blocking Macros in Network Share Files
Question details
Microsoft 365 blocks macros in files stored on a corporate network share, whereas the same files open without warnings in previous versions like Office 2019.
- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Accessing and running macro-enabled files stored on a corporate network share.
- Observed behavior
- Microsoft 365 prevents the macros from running due to enhanced security policies against untrusted files, displaying an untrusted-file warning.
Verify that the macro-enabled file comes from a completely trusted source before attempting to unblock it, as running unknown macros can pose a severe security risk to your device.
Unblock the Individual File via Properties
A quick and simple manual method to allow macros to run for a specific, trusted file.
Microsoft 365 blocks macros by default for files originating from potentially unsafe locations. If you trust the file, you can manually remove the Mark of the Web (MOTW) attribute.
Navigate to the location of the blocked file using Windows File Explorer.
Right-click the file and select Properties from the context menu.
In the General tab, look for the Security section at the bottom. Check the box next to Unblock, then click Apply and OK.
Unblock Files using PowerShell
An alternative method for users who prefer using the command line or need to process files efficiently.
Configure Trusted Locations for Network Shares
Best for administrators to allow all files on a specific corporate network share to run macros without requiring manual unblocking by users.
Try WPS Office for Seamless Document Management
If Microsoft 365's strict macro security policies and network share restrictions are disrupting your workflow, consider using WPS Office as a reliable alternative. It offers powerful office tools with an intuitive interface without compromising on productivity.
- 1. Download the Installer: Visit the official WPS website and download the free WPS Office installation file.
- 2. Install the Software: Run the downloaded file and follow the quick setup wizard to install.
- 3. Open Your Documents: Launch WPS Office and open your files directly to continue working without hassle.

Frequently Asked Questions
Why does Microsoft 365 block macros that worked perfectly in Office 2019?
Microsoft 365 has implemented stricter default security policies to block VBA macros originating from the internet or untrusted network zones. This is to protect users from malicious scripts, a feature that was not enforced by default in Office 2019.
How can IT administrators manage macro blocking on network shares globally?
Administrators can utilize Group Policy Objects (GPO) to deploy organizational policies. They can designate specific network paths as Trusted Locations, configure the Local Intranet zone, or require macros to be digitally signed by a Trusted Publisher.
Is it completely safe to use the Unblock feature on macro files?
Unblocking removes the file's internet security tag. You should only use the Unblock feature if you are absolutely certain the file comes from a legitimate source and you fully trust the contents of the macro.




