cancel
Showing results for 
Search instead for 
Did you mean: 

MS Outlook VBO - Error in get mail stage

NielsHansegård
Level 3
Hi.  I am trying to use the MS Outlook VBO - Get Mail. When i run the process to get the unread e-mail from Outlook, the object runs into Abort. I am not sure why the process is returning this error. According to the VBO documentation MS Outlook VBO should work with both 64bit and 32bit Outlook and 2013 and 2016 version.  The error message "Internal : Could not execute code stage because exception thrown by code stage: Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))"  My process is: Start -> Action: Get mail that is referring to the object "Get Received items (Basic)" And the error message is thrown in the "Internal Get items" in the Object.  Anyone who have experienced this error message in relation to MS Outlook VBO or any other object?   Thank you!   
11 REPLIES 11

ViditBhargava1
Level 2
Hi Niles,

Did you find the solution for this as I am also getting the same error.

Thank you!

------------------------------
Vidit Bhargava
System Engineer
Infosys
Asia/Kolkata
------------------------------

I ran into this same error for send email from Outlook VBO (BP 6.5), and I had to do an ugly workaround for it.

Created input Profile on the stage for the Outlook profile

oNS.Logon(<profile name>, <password optional, left blank>, <show dialog set False to avoid profile chooser>, <new session set to True, because this is the only Outlook session running>

I drilled down into the Send Email code stage and added the middle two lines
exsting -- Dim app = CreateObject("Outlook.Application")
me--        Dim oNS = app.GetNamespace("MAPI")
me--        oNS.Logon(Profile,,False,True)
existing-- Dim mail = app.CreateItem(0)

Not sure if this is something you can implement/have implemented and there are better ways to do it. Hopefully, this is helpful.

BC

------------------------------
Brian Clayton
Lead Developer - C#/Blue Prism RPA
The Auto Club Group
America/Detroit
------------------------------