Hi all,
I’m currently working on my final project for graduation, and I’m using UiPath to automate an Excel-based process. The workflow includes:
- Reading and merging two Excel files
- Creating a new
.xlsmfile with two new sheets - Running a VBA macro to format the sheets
- Sending the final file to Telegram
The macro runs perfectly if I open the Excel file manually and run the macro from inside Excel. However, when I try to run the same macro using Invoke VBA in UiPath, I get this error:
Invoke VBA: In order for this activity to work, Trust Access to the VBA project object model must be enabled…
Of course, I already:
- Enabled all macros
- Checked “Trust access to the VBA project object model” in Trust Center settings
- Tried restarting Excel and UiPath
- Ensured file is
.xlsmand saved before invoking
This is my personal laptop, and there’s no IT/admin restriction, antivirus, or GPO blocking access.
I also tried this registry key (AccessVBOM = 1), but still no success:
pgsql
CopyEdit
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\<version>\Excel\Security
Questions:
- Why does this error persist even though all trust settings are enabled?
- Is there a more reliable way to trigger macros from UiPath?
- Would
Workbook.RunMacroor UI automation be more appropriate thanInvoke VBA? - Any known limitations with Office 365 in headless/automated mode?
Thanks in advance! I really need this to work fully automated for my graduation project ![]()
