Alphabet.Outlook.SaveOutlookMailAs operation failed

Hi all,

I have a save outlook mail as activity which used to work, failed occassionally, and now fails every time without fail. The error code is:

19.4.3+Branch.support/v2019.4.Sha.a8f4efb75012dc834aa4be501a7086e9372ef1b3

Source: Save outlook mail as

Message: The operation failed.

Exception Type: System.Runtime.InteropServices.COMException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Runtime.InteropServices.COMException: The operation failed.
at Microsoft.Office.Interop.Outlook.NameSpaceClass.GetItemFromID(String EntryIDItem, Object EntryIDStore)
at Alphabet.Outlook.AlphabetOutlookApi.getMailItem(MailMessage message)
at Alphabet.Outlook.AlphabetOutlookApi.saveMailMessageAs(MailMessage message, String path, MailOutput outputFormat)
at Alphabet.Outlook.SaveOutlookMailAs.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Any help solving this issue would be appreciated!

1 Like

Fine
I hope we have outlook installed in our machine if not kindly install it

Cheers @SoqedHozi

Yes outlook is both install and running, and the Get outlook email messages precursor is working fine.

This step ran flawlessly just prior to this, so I’m wondering if there’s a memory issue that leads to this? What does the error actually mean is going wrong?

On that - I ran it this morning having disconnect from the VM I’m running studio on overnight. It ran through this activity successfully for the first set of MailMessages but on the second loop of the same run it produced the above error again.

Continued testing seems to show that restarting outlook allows it to run once through but it still crashes on the second loop.

Closing and opening outlook is inelegant. I’d have to identify if outlook is running and potentially have a long timeout on the get mail messages activity if outlook takes a while to start or connect to the server. It’s also seemingly inconsistent as a solution.

I wonder if it’s related to the occasional failure to move outlook emails due to the folder not being identified? It seems there is a struggle connecting (hence as well why I want to avoid restarts)

Any help at all? It’s pretty fundamental to my project to be able to save emails in .msg format and it’s very concerning that this activity is failing regularly.

I’m also struggling to get move mail messages to work consistently as I often get the “Move Outlook Mail Message: The specified folder does not exist” error.

On Friday this ran through the move and save activities twice without issue. However, I hadn’t changed anything! I’d love this to be as reliable as you’d expect.

I think the move is solved by not caching outlook. However, the save is still an issue. I have tried saving locally instead of a mapped drive and that is still not working.

Hi
Have you got workaround for this issue? since im also facing the same issue

thanks
jey

Hello! In case you’ve tried the solutions above, please open a bug on the component’s page on Connect. The author should help bring more light on what’s happening! :slight_smile:

I’ve got a bug:

  • on a signed message that I try to save as MHTML I get the error below
    image

  • worst than this, the flow remains stuck as there is no timeout for this activity