VBA & Macro Problems

How to Fix Excel Macros Blocked When Opening Files from OneNote

Bushra ParveenBushra Parveen Oct 19, 2026 870 views

Question details

Users encounter blocked macros when opening Excel workbooks directly from OneNote, as the files are saved to an untrusted temporary location restricted by Microsoft security updates.

How to Fix Excel Macros Blocked When Opening Files from OneNote
Product
Excel
Device & OS
Windows
Scenario
Opening an Excel workbook containing macros directly from a OneNote page.
Observed behavior
Excel blocks the macros from running because the workbook opens from an untrusted temporary path, and standard trusted location settings do not resolve the issue.
Before you start

Verify that the Excel workbook and its macros come from a trusted, secure source before you proceed with unblocking them to protect your computer from malicious scripts.

Solution 1Recommended

Copy the Workbook to a Trusted Location and Unblock the File

Move the workbook out of the temporary OneNote folder to a standard local directory, manually unblock the file properties, and add the folder to Excel's Trusted Locations.

Microsoft's security updates restrict macros from running when opened from temporary locations, such as the folder OneNote uses to launch attachments. To safely run your macros, you must move the file to a permanent folder and designate that folder as a Trusted Location in Excel.

1
Save the workbook locally

Copy the Excel workbook from OneNote and paste it into a permanent local or network folder on your computer (e.g., your Documents folder).

2
Unblock the file via Properties

Right-click the saved Excel file and select 'Properties'. On the General tab, look for a security warning at the bottom. If present, check the 'Unblock' box and click 'Apply', then 'OK'.

3
Access Excel Trust Center Settings

Open Excel and navigate to 'File' > 'Options'. In the Excel Options dialog, click 'Trust Center' on the left pane, then click the 'Trust Center Settings' button.

4
Add a new Trusted Location

Select 'Trusted Locations' from the left menu and click 'Add new location'. Browse to the folder where you saved the workbook, check 'Subfolders of this location are also trusted' if necessary, and click 'OK'.

5
Open and test the workbook

Open the workbook from your newly configured Trusted Location. The macros should now run without being blocked by Excel's security policies.

Copy the Workbook to a Trusted Location and Unblock the File
Security Tip: Never add temporary folders to your Excel Trusted Locations, as this compromises your system's security. Additionally, do not use Internet Options in the Control Panel to define trusted local drives, as it is meant for network domains and IPs.
Free Microsoft Office alternative

Experience Hassle-Free Spreadsheets with WPS Office

If strict macro security updates and temporary folder restrictions in Microsoft Office are disrupting your workflow, consider switching to WPS Office. It provides a lightweight, user-friendly, and highly compatible alternative for viewing and editing your spreadsheet files seamlessly.

  1. 1. Download WPS Office: Visit the official WPS Office website to download the free installation package for your operating system.
  2. 2. Install the Software: Run the installer and follow the on-screen instructions to set up WPS Office on your computer.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your Excel files directly to enjoy a fast and seamless editing experience.
High compatibility with Microsoft Excel formats, including .xlsx, .xls, and .csv.Lightweight installation with faster load times and smoother performance.Free to use, offering a familiar interface that requires zero learning curve.All-in-one suite that handles documents, spreadsheets, and PDFs natively.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel block macros in workbooks opened directly from OneNote?

When you open an attachment directly from OneNote, the file is saved to a temporary location. Microsoft's updated security policies often classify these temporary folders as untrusted or internet-sourced, automatically blocking any macros to protect your computer.

Can I use Internet Options to make my local drive a trusted site?

No, Internet Options in the Control Panel are designed for network and web zones (like domains or IP addresses) and will not correctly apply trust settings to a local drive path. You must use Excel's internal Trust Center to configure trusted local locations.

Should I add the OneNote temporary folder to Excel's Trusted Locations?

It is highly discouraged. Broadly trusting temporary folders significantly reduces your system's security, as malicious scripts downloaded from the internet or other applications could automatically run if they land in that folder.