web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Issue with Embedded Of...
Copilot Studio
Unanswered

Issue with Embedded Office (Excel) in MFC C++ Application – Macros Blocked in Office 365/2024

(0) ShareShare
ReportReport
Posted on by

Hello,
I am developing an MFC C++ application and want to embed an Excel file into my form using OLE Object. When I open the Excel (.xlsm) file directly in Office, macros work normally.
However, when I embed the Excel file into my MFC application via OLE, Office blocks the macros, even though I have already taken the following steps:

Actions I have tried:

  1. Added both the source code folder and the Excel file to a Trusted Location.
  2. Enabled VBA/macros in Office settings.
  3. On Office 2021, everything works fine, but on Office 365 and Office 2024 or later, macros are blocked.

Error message:
When opening the embedded Excel file from my MFC app, Office shows "Macros have been disabled."

My question:
Has anyone encountered this issue before?
Is there any way to allow macros to run when embedding an Excel file into an MFC app via OLE?
Are there any additional permissions, registry configurations, or policies that need to be set?

Thank you very much for your help!

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Liquid error: Object of type 'Adxstudio.Xrm.Web.Mvc.Liquid.EntityReferenceDrop' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Valantis 556

#2
chiaraalina Profile Picture

Liquid error: Object of type 'Adxstudio.Xrm.Web.Mvc.Liquid.EntityReferenceDrop' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. chiaraalina 155

#3
Michael E. Gernaey Profile Picture

Liquid error: Object of type 'Adxstudio.Xrm.Web.Mvc.Liquid.EntityReferenceDrop' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Michael E. Gernaey 118 Super User 2025 Season 2

Last 30 days Overall leaderboard