cancel
Showing results for 
Search instead for 
Did you mean: 

MS Outlook Email VBO - Save Attachments - Action fails when Outlook client is NOT open

HowardBlake
Level 5
I am using the MS Outlook Email VBO along with BP v 6.9. 

When running a process which uses the Save Attachments action from this VBO I have observed that it fails if the Outlook client is NOT open with the following Error: Internal: Could not execute code stage because exception thrown by code stage: The operation failed.  If the Outlook client is open then attachments get saved.

Whilst I can include some automation to first open MS Outlook before attempting to execute the Save Attachments action I would prefer not to.  

Has anyone else come across this issue and if so is there a known fix (other than opening the Outlook client first).

Many thanks
4 REPLIES 4

ewilson
Staff
Staff
Hi @HowardBlake,

Can you elaborate on what you mean by the client must be open? Generally, any action on the Outlook VBO will cause Outlook to start. Normally, it will be minimized to the Task Tray and will include a message about Outlook being under the control of another application, or something to that effect. Is that what you're seeing, or are you saying the actual GUI must up and visible on the screen?

Cheers,
Eric​

HowardBlake
Level 5
Hi Eric and thanks for your response.

What you say is correct - If I use the MS Outlook VBO to perform actions against Outlook (e.g. Get Received Items (Basic) ) then the VBO does start Outlook and has an icon minimized to the Task Tray.  However, this is not the case for the Save Attachments action in this VBO.  For instance if later in a process I use the same VBO to Save Attachments (based on a saved Email ID held in a work item) an exception is thrown by the VBO 'Cannot create ActiveX component'.  The Outlook icon in the Task Tray also states 'Outlook is closing' prior to calling this action. 

The only way I have been able to workaround this issue is to first Launch Outlook (using Start Process) so that the Outlook Application is running as a process on the machine.

Thus far I have only experienced this issue with Save Attachments.  All other actions I use within the VBO work without me having to launch Outlook

david.l.morris
Level 14
I have seen some orgs have this issue, and the way it's normally handled is exactly what you've done which is to trigger outlook to start up before using actions that don't work when it's closed. However, the strange thing is that I'd assume none of the actions would work for you.

As for the right solution to this, I don't know that I've personally witnessed the solution unfortunately. I would suggest testing this on multiple machines, and even try it at home on a personal computer if you have a license you can use at home (like a training/partner/etc. license or maybe if you use the learning edition or something). I imagine it's possible that the action is correctly trying to trigger Outlook to open its background instance but that something is blocking it from succeeding. Maybe antivirus? The code stages between, for example, 'Internal_Get Items' and 'Save Attachments' seems like it'd indicate, as Eric suggested, that all of the actions are triggering that background instance of Outlook to open.

Also, I just noticed that this post was originally in January and that you've been dealing with this for a little while. You may want to submit a Support Ticket to Blue Prism and see if BP can help troubleshoot more. I suspect there's a solution but it might just be difficult to find.
Dave Morris 3Ci at Southern Company Atlanta, GA

ewilson
Staff
Staff
@HowardBlake,

I've tried recreating the condition you mention, but so far I have not experienced it. I'm running Blue Prism v6.9​.0.26970 with the latest MS Outlook VBO from the Digital Exchange (which actually points to the VBO on GitHub). I have a simple process that performs a Get Received Items (Advanced) followed by a Save Attachments. The entry ID I'm using points to an email that contains two PDFs as attachments. I'm saving the attachments to my Temp folder (C:\temp). Everything's working as expected whether Outlook is running before I step through the process or not.

36911.png

Do you experience the problem if you step through the process in debug as well as running from Control Room/Scheduler?

FWIW - There is another Outlook VBO on the DX from a company called Neoops. You might try downloading their VBO and see if you experience the same behavior. You can find it here:

https://digitalexchange.blueprism.com/dx/entry/3351/solution/neoops-ms-outlook-vbo

Their implementation of the Save Attachments action is quite a bit more straightforward than that of the Blue Prism VBO because it's not attempting any pattern matching on files.

Cheers,
Eric