Exception calling "Run" with "1" argument(s): "Exception from HRESULT: 0x800A9C68"

Hi community,

When I try to run a macro in Excel from Easymorph I got this error.

Exception calling “Run” with “1” argument(s): “Exception from HRESULT: 0x800A9C68”.

But two things about it.
Nr 1: 2 days ago it worked totally fine, and today it’s not working; and I haven’t touched the EM project nor the macro in excel.
Nr 2: If I run the macro like: I open excel ad run macro it has no issue at all.

Can anyone help me? It’s super annoying because I run this with the Launcher, and now I have to interact with this.

Did the macro actually work?

yes, this is what I meant with it was working 2 days ago, and it is working still today if I run it in Excel.

I mean, when the workflow failed, did the macro do what it was intended to do before the workflow failed? In other words, which was the case (from below)?

  1. The macro worked, but the action “Excel command” failed.
  2. The macro didn’t work and the action “Excel command” failed.

Also, is the spreadsheet that the macro interacts with still open (e.g. in Excel)?

it’s number 1. Macro works, excel command fails. Nope, excel file was closed when I ran the excel command in Easymorph

The error probably appears because the “Excel command” tries to close the spreadsheet too quickly.

Try moving the “Excel command” into a separate module, then call the module using the “Call” action in the mode “Collect errors and continue”. In this case, the error will be ignored and the workflow won’t fail.

Alternatively, you can try to use PowerShell to run the script and insert a delay before closing the workbook. See an example (without a delay) here: Running Excel Macro in EasyMorph Project - #2 by dgudkov

I’ll try the first suggestion. :slight_smile: because I tried with PowerShell and it does the same.

still not working… I’ll try to check if the update of either part messed with it…

What exactly isn’t working? Also, are you running on Desktop or Server? Screenshots would be helpful.


Still not clear to me.

I can’t explain better.

I have an excel file. I have a macro in it which I’d like run from Easymorph.

The macro WORKS!, It’s running if I open the excel file and click on run.
BUT when I try to run it from EasyMorph it’s not running, BUT it DID run last Monday.

If not clear still, pls delete the case. Thanks.

Did you try the 1st suggestion? If yes, what didn’t work with it?

yes, same error

Did you switch the “Call” action into the “Capture errors and continue mode”? It should suppress the error.

image

yes, I did

That should suppress the error then.

If you have difficulties with configuring the action, we can have a screen-sharing session and look at your configuration. Just send me a DM.