Macros + Error + Source: Execute Macro +Message: Exception from HRESULT: 0x800A03EC Exception Type: System.Runtime.InteropServices.COMException)

Hi,

I have developed an automation and have execute macros acitivity. The code works perfectly on my machine.

When I deployed the code to a user machine the invoke macos activity is throwing the below error.

21.10.4+Branch.master.Sha.8f864e3db4251aecabea63041087de2634460029

Source: Execute Macro

Message: Exception from HRESULT: 0x800A03EC

Exception Type: System.Runtime.InteropServices.COMException

RemoteException wrapping System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC
at UiPath.Excel.Activities.ExecuteMacro.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
β€” End of stack trace from previous location where exception was thrown β€”
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
β€” End of stack trace from previous location where exception was thrown β€”
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
β€” End of stack trace from previous location where exception was thrown β€”
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Does anyone know how to fix this?

First thing I would do is check if in the machine in which you are running the bot the Excel has the appropriate permissions to execute macros.
Other thing that might have an impact is if the Office versions are different beetwen your machine and the user’s.

I know that this are very basic checks, but it’s important to know if this is ok to move forward.

We both have the same office versions. The macos runs the fist time when it is called perfectly on the user machine. The second time in the process the macros is called it throws that error.

The same code works perfectly on my machine.

This InteropServices error is a pain. I got it when I started using high density robots configuration on my servers.

Well, take a look a this page, it has some topics about it:

Apart from that, I would check:

  • If activities in the bot are up to date
  • if the robot installed in the user machine is also in the same version as yours
  • if there are connectivity issues in the user machine

This usually is a hard one to get to a final answer.
In the case of you not being able to move forward, I would recommend opening a ticket with UiPath support.

Good luck!

1 Like

I kind of figured what is going on. In the user machine when the bot runs the macros, the bot generates files such as macros1, macros2 in the documents folder.

I see that the documents folder is connected to one drive. When I turn off the auto upload to one drive the issue does not occur. I am sure that this is not the solution.

Did anyone see something similar. How did you handle it?

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.