Execute Macro - Exception from HRESULT: 0x800AC472

I have a production process that was running fine all of last week. Suddenly this morning I get the title message. After some poking around, it sounded like an issue of excel trying to access a workbook before it was ready. I tracked the process through the macro though, and the macro errors out after sending the last email, before closing out the workbook. I tried adding a various delay times to the macro, no luck. The macros work 100% of the time when run manually. I feel like I’m playing whack a mole getting UiPath to Execute macros though.

Any help would be greatly appreciated.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/9168f9f2-e5bc-4535-8d7d-4e374ab8ff09/hresult-800ac472-from-set-operations-in-excel?forum=vsto

I looked through that, but I’m not clear on what needs to be done. The macro itself runs fine, it’s only an issue when UiPath tries to execute it. The error then falls within the first macro. Is the solution having someone build a loop in the macro itself purely to support UiPath?