How to Fix Excel Macro Blocking on Trusted Network Drives
Question details
The user needs to unblock macros in macro-enabled Excel files stored on a network drive, as security warnings persist despite modifying Trust Center settings.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Accessing and running macro-enabled Excel files stored on a shared network drive.
- Observed behavior
- Excel continues to block macros and displays a security warning because the network path is treated as an internet location, often due to the use of an IP address instead of a hostname.
Ensure you know the exact server hostname for your network drive rather than its IP address, and verify that you have administrative access if Microsoft 365 tenant policies need to be adjusted.
Use Server Hostname for Trusted Network Locations
Configure Excel to trust the network location using the server's hostname rather than its IP address, as Microsoft Office security blocks IP-based paths.
By default, Microsoft Office blocks macros from files it identifies as coming from the internet. If you use an IP address to map your network drive, Excel treats it as an untrusted internet zone. Using the server hostname resolves this issue.
Launch Microsoft Excel, click on 'File' in the top-left corner, select 'Options' at the bottom, and then click on 'Trust Center'. Click the 'Trust Center Settings' button.
In the left-hand menu, select 'Trusted Locations'. At the bottom of this window, check the box that says 'Allow Trusted Locations on my network (not recommended)'.
Click 'Add new location'. In the Path field, enter the network path using the server hostname (e.g., \\ServerName\SharedFolder) instead of the IP address (e.g., \\192.168.1.50\SharedFolder).
Check 'Subfolders of this location are also trusted' if your Excel files are stored inside nested folders. Click 'OK' on all windows to apply the changes, then restart Excel.

Force Microsoft 365 Macro Policy Updates
If trusted locations are configured correctly but macros are still blocked, you may need to refresh your organization's Microsoft 365 macro policies.
Try WPS Office for a Hassle-Free Macro Experience
If you are struggling with strict internet macro blocking policies in Microsoft 365, consider switching to WPS Office. It provides powerful VBA support for your macro-enabled spreadsheets without the overly complicated security policy setups, making it easier to work securely on a local network.

Frequently Asked Questions
Why does Excel block macros on my local network drive?
Microsoft Office uses a feature called 'Mark of the Web' to block macros from files identified as coming from the internet or untrusted zones. If your network drive is not explicitly trusted via hostname, Excel treats it as an external, potentially unsafe source.
Why did adding my network IP address to Trusted Locations not work?
For security reasons, Microsoft Office restricts the use of IP addresses for defining Trusted Locations. You must map the drive and add the path using the server's actual hostname (e.g., \\ServerName\Folder) for the trust settings to apply.
How long does it take for Microsoft 365 macro policy changes to apply?
Policy changes made in the Microsoft 365 Apps admin center (config.office.com) can take up to 24 hours to propagate to all users. Signing out of your Office account in Excel and signing back in can sometimes force an immediate update.




