How to Allow Macros from a Network Drive in Office
Question details
Users need to allow macros to execute from files stored on a mapped network drive without triggering Microsoft Office security blocks.

- Product
- Microsoft Office
- Device & OS
- not provided
- Scenario
- Opening a macro-enabled Office file stored on a network location or mapped drive.
- Observed behavior
- Office blocks the macros because the source is considered untrusted, and adding the mapped drive letter or IP address to Trusted Locations does not resolve the security warning.
Ensure you have the exact server name for your network drive, and confirm with your IT administrator that running macros from this specific network location complies with your organization's security policies.
Map the Network Location Using the Server Name
Office security features often block IP-based network paths. Mapping the drive using the actual server name ensures the path can be properly recognized and trusted by the Office Trust Center.
Microsoft Office handles network security strictly and frequently distrusts paths mapped via an IP address. By remapping the network drive using the server name (hostname) and updating your Trust Center settings, Office can correctly validate the network directory.
Open File Explorer, right-click on the network drive that is currently mapped using an IP address (e.g., \\192.168.0.1\networkdirectory), and select 'Disconnect'.
Map the network drive again, but this time enter the server-based path (e.g., \\fileserver\networkdirectory) instead of using the IP address.
Open your Microsoft Office application (such as Excel or Word). Navigate to File > Options > Trust Center, and click the 'Trust Center Settings' button. Select 'Trusted Locations' from the left menu and check the box at the bottom for 'Allow Trusted Locations on my network'.
Click 'Add new location', enter the newly mapped server name path into the field, check 'Subfolders of this location are also trusted' if necessary, and click OK to save your settings.

Try WPS Office for Seamless Macro and File Compatibility
If Microsoft Office's strict network macro policies disrupt your workflow, consider WPS Office. It provides robust compatibility with Microsoft formats, including macro-enabled files, within a lightweight and familiar interface.
- 1. Download WPS Office: Visit the official WPS website to download the free version of the office suite.
- 2. Install and Launch: Follow the on-screen instructions to install WPS Office on your computer.
- 3. Open Your Macro-Enabled File: Launch WPS Spreadsheet or Writer and open your network-stored file seamlessly.

Frequently Asked Questions
Why does Office block macros even after adding the IP address to Trusted Locations?
Microsoft Office security protocols often do not recognize IP addresses in the Trusted Locations list as secure. To resolve this, you must use the server's hostname or fully qualified domain name (FQDN) instead of the IP address.
Is it safe to allow macros from a network drive?
It is only safe if you completely trust the network environment and the source of the files. Always consult your IT administrator before allowing network macros, as malicious macros can execute code that harms your system.
How do I enable 'Allow Trusted Locations on my network'?
In your Office application, navigate to File > Options > Trust Center > Trust Center Settings > Trusted Locations. At the bottom of the window, check the box that says 'Allow Trusted Locations on my network (not recommended)' and click OK to save your changes.




