logo
search
VBA & Macro Problems

Fix Excel Cannot Open XLSM File in OneDrive Trusted Location

Kushani NimanthikaKushani Nimanthika Oct 9, 2026 869 views

Question details

Users are unable to open macro-enabled XLSM workbooks stored in a OneDrive Trusted Location using Microsoft Excel.

How to Fix Excel Cannot Open an XLSM File in a OneDrive Trusted Location
Product
Microsoft Excel, OneDrive
Device & OS
not provided
Scenario
Attempting to open shared or personal macro-enabled workbooks hosted on a OneDrive network path.
Observed behavior
Excel fails to open the XLSM file entirely, or fails to open it when macros are enabled, often due to an incorrectly configured d.docs.live.net path or a OneDrive account mismatch.
Before you start

Verify you are signed into the correct Microsoft account associated with the OneDrive folder, and test downloading the file to your local computer to ensure the XLSM file is not corrupted.

Solution 1Recommended

Recreate the OneDrive Trusted Location in Excel

Update the trusted location settings in Excel to ensure the OneDrive URL and the d.docs.live.net path are mapped to the correct user account.

If a previously used docs.live.net path was altered or belongs to another account that shared the file, Excel's Trust Center will block the macro-enabled workbook. Deleting and recreating this path ensures Excel is using the proper network routing.

1
Remove the broken trusted location

Open Excel and click on 'File' > 'Options'. Navigate to 'Trust Center' and click 'Trust Center Settings'. Select 'Trusted Locations', find the problematic OneDrive path in the list, and click 'Remove'.

2
Obtain the correct OneDrive URL

Log into OneDrive on your web browser. Navigate to the exact folder containing your XLSM file and copy the URL from the address bar (or copy the direct sharing link provided by the owner).

3
Add the new trusted location

Return to the Excel Trusted Locations window and click 'Add new location'. Paste the copied OneDrive URL into the path field, check the box for 'Subfolders of this location are also trusted', and click 'OK'.

Recreate the OneDrive Trusted Location in Excel
Shared Folder Limitations: If the folder belongs to another user, you may need the exact d.docs.live.net address from the owner's sharing configuration rather than standard web URLs.
Free Microsoft Office alternative

Open Macro-Enabled Spreadsheets Easily with WPS Office

If Excel's strict Trust Center and OneDrive network path issues are preventing you from accessing your work, switch to WPS Office. It provides a lightweight, hassle-free environment to view, edit, and manage your spreadsheets.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite.
  2. 2. Save the XLSM file locally: Download your problematic XLSM file from OneDrive directly to your computer's local hard drive.
  3. 3. Open and edit seamlessly: Open the file using WPS Spreadsheet to start viewing and editing your data instantly without cloud path errors.
Seamless compatibility with Microsoft Excel formats including .xls, .xlsx, and .xlsm.Bypass complex network path errors and strict cloud trusted location configurations.Free to download, highly lightweight, and runs smoothly on older devices.Familiar user interface requiring zero learning curve for Excel users.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my XLSM file open without macros but fails when macros are enabled?

This occurs because Excel's Trust Center actively blocks macro execution from cloud or network paths (like OneDrive) if the exact server address isn't properly registered and verified in the Trusted Locations list.

What is the d.docs.live.net path in Excel?

It is a network path protocol used by Microsoft Office to map personal OneDrive cloud storage directly to your Windows File Explorer and Office applications, enabling seamless real-time file access.

How can I quickly bypass OneDrive Trusted Location errors?

You can bypass cloud network path errors by downloading the XLSM file directly to a local folder on your computer (such as your Desktop or Documents), and then adding that local folder to Excel's Trusted Locations.