How to Run Macro-Enabled Office Files from a Network Location
Question details
Users are unable to execute macros in Office files when accessing them from a network location.

- Product
- Microsoft Office
- Device & OS
- not provided
- Scenario
- Opening a macro-enabled Office document, such as an Excel workbook, stored on a shared network drive.
- Observed behavior
- The macros are blocked from running by security policies, even if the network folder was previously added to the application's trusted locations.
Ensure you have the exact hostname or IP address of your file server and possess administrative privileges on your computer to modify Internet Options or Group Policy settings.
Add the Network Share to Trusted Sites
Bypass security blocks by explicitly trusting the file server's Fully Qualified Domain Name (FQDN) or IP address in your system's Internet properties.
When files are opened from a network location, Windows may apply stricter security zones, treating them as internet files. Adding the server to Trusted Sites helps resolve this issue.
Open the Windows Control Panel, search for 'Internet Options', and click to open the properties window.
Go to the 'Security' tab, select 'Trusted Sites' (the green checkmark icon), and click on the 'Sites' button.
In the 'Add this website to the zone' field, enter the fully qualified domain name or IP address of your file server and click 'Add'.
Instead of using a mapped network drive letter (like Z:), access the file using its UNC path with the server hostname, for example: \\myserver\folder\file.xls.

Configure Trusted Sites via Group Policy
For enterprise environments, network administrators can deploy macro security configurations to multiple users simultaneously.
Use WPS Office for Seamless Macro and File Management
If strict Microsoft Office network security policies frequently disrupt your workflow by blocking macros, consider switching to WPS Office. It provides robust compatibility with macro-enabled files and seamless file management without the complex network policy hurdles.
- 1. Download WPS Office: Visit the official WPS website and download the free installer for your system.
- 2. Install and Launch: Follow the installation prompts and launch the WPS Spreadsheet application.
- 3. Open the Network File: Use the built-in file explorer to navigate directly to your network drive and open the macro-enabled file.

Frequently Asked Questions
Why do macros work locally but get blocked on a network drive?
Windows and Office use security zones to determine file safety. Files originating from a network share or external source are often treated similarly to internet files, automatically triggering a block on macros to prevent potential malicious code execution.
Can I use a mapped drive letter (like Z:) to open the macro file?
Mapped drives are often processed differently by Windows security zones, which can bypass your trusted location settings. It is highly recommended to use the Universal Naming Convention (UNC) path, such as \\servername\folder\file.xlsm, to ensure the trusted site rules apply correctly.
Do I need administrator rights to change Trusted Sites?
Yes, modifying the Trusted Sites list in Internet Options typically requires administrative privileges on your Windows account. If you are on a company network, these settings might also be locked by your IT department.
What happens if I still can't run macros after adding the IP to Trusted Sites?
Ensure that the file is not blocked by a 'Mark of the Web' tag. Right-click the file in File Explorer, select 'Properties', and check the 'General' tab. If you see a 'Security' section stating the file came from another computer, check the 'Unblock' box and click Apply.




