cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error with MS Outlook Email VBO: Save Mail Attachment action

PraveenKumarC
Level 4

Hi,

I am using latest MS Outlook Email VBO -> Save Attachments action to download the excel attachment into a folder location from a Shared Mailbox. Here are my steps: 1. Login Agent 2. Main Process : Bot reads the mail from Shared Mailbox and stores the Entry ID (it works till here without opening outlook) and then tries to download the mail attachment (Inputs are destination folder, entry id and File pattern is default value and Ignore embedded attachments as True.)

During the testing, it only works when the Outlook is opened and it's failed with Operation failed error when the outlook is not launched. Would like to if anyone faced the issue or able to execute it successfully? and Does this action needed Outlook to be launched before executing save attachments?

5 REPLIES 5

Nandhakumar
Level 6

Hi @PraveenKumarC ,

Yes, i had faced the similar issue for reading the emails from shared mailbox.

Most of the time, it wasn't fetching all the unread email from the sub folder. Because business users raised this issue that bot is not processing all the emails received.

Let's say, total unread items 20 but when bot fetched via VBO it was only 14 or 15. So we had to start the outlook on the bot machine to let the outlook load all the email and fetch the list of emails then loop them to save the attachments.

Note: we were able to save the attachment without starting outlook as well.

Thanks,

Nandha

PraveenKumarC
Level 4

@Nandhakumar so you had to open outlook before fetching all the emails and then only save the attachments right? 

@ewilson Could you please confirm if the behavior is correct? As outlook needs to be launched and then a certain delay to be followed before performing any other actions?

Hi @PraveenKumarC 

I faced this same issue, technically the way it connects outlook shouldnt necessarily need to be open for it to get emails but for some reason if its not then we got an error of the bot trying to connect and just getting stuck in this stage until we terminated the process. Annoyingly when i had a POC desktop machine running it worked fine without outlook being open but then when we moved to VDIs we hit this issue. To get round it i just added outlook to the startup folder so it opens on login but im not sure why it worked previously then stopped.

Nandhakumar
Level 6

Hi @PraveenKumarC ,

We are able to save attachment without starting outlook even now. But the issue we faced was bot not fetching all the emails from the shared mailbox.

So as a workaround, we have to start the outlook and sleep for a while to load all the emails then start reading the emails, which solved the issue for us.

Thanks,

Nandha

@PraveenKumarC as far as I can tell this comes down to some sort of strangeness in the COM API of Outlook and how Outlook communicates with the Exchange server. It seems some of the communication may actually be tied to Outlook's UI thread in which case you would have to have Outlook running for it to work. The weird thing is that technically Outlook is running as soon as you execute any action on the Outlook VBO. You can actually see it in the Task Manager. It's just that the UI isn't present.

Cheers,
Eric