cancel
Showing results for 
Search instead for 
Did you mean: 

Outlook VBO Move Email

AlexTraynor1
Level 3

Hi, I am having an issue with outlook where in an automation, when trying to move an email item from the main inbox to a subfolder. This is for a shared mailbox accessed through the desktop app.

When multiple items are run, the first one completes successfully, but then none after this do, and it is not clear why this might happen.

I am using the MS Outlook VBO (v 10.2.3)

Thanks

1 BEST ANSWER

Best Answers

Mukeshh_k
MVP

Hi @Alex Traynor ,

Can I ask what does the page number 1.1 does - does it open the outlook desktop launch? it works through server you don't actually need to launch outlook desktop as this VBO uses the outlook interlop libraries to interact with outlook in background to move an email by its message ID, also regarding the sleep stages - can you create a sub-page for moving the email actions and safeguard it and call that sub-page whenever necessary it gives you a clear picture and better exception handling.

let me know if you still face issues after implementing the above suggested. Additionally if this still persists I would be happy to set up a quick teams call to see through this.

35415.png

35416.png

35417.png

------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

View answer in original post

11 REPLIES 11

ewilson
Staff
Staff

Hi @Alex Traynor

Can you elaborate on your scenario. When you say you have multiple items do you mean you've pulled a list of message IDs and you're now trying to loop over that collection to move them all? What error do you receive?

Cheers,

Eric

AlexTraynor1
Level 3

Hi @ewilson 

Yes that is the right scenario, the after the first one completes successfully, the others receive this error message:

Internal : Could not execute code stage because exception thrown by code stage: 
Error while trying to move item '000000008905F867396F0B4CAAE5370D1CE8B5A30700B5B351282064B04A94DDC06BB4D8E00900000000010C00007FCD254E87EDC64BA69FCFFCB5CAD1F2000148239E210000'.
The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

ewilson
Staff
Staff

@Alex Traynor

Ok. That error is being thrown by Windows/Office basically saying that Outlook isn't responding to your request. The first thing I'd try to is to add a sleep step at the end of the loop, so that the process waits for a second or two before trying to move the next message. This gives Outlook a chance to get it's house in order (i.e. communicate the change to Exchange) before it moves to the next message.

Cheers,

Eric 

AlexTraynor1
Level 3

Hi @ewilson

I have just tried that but unfortunately the error is still occurring. I added steps to close and reopen outlook plus a sleep before each item is processed.

Thanks,

Alex

Mukeshh_k
MVP

Hi Alex Traynor

if its recursive and sending update after every item processing I am sure you are using sleep stages to let the processing complete gracefully as its usually in quick time but some times servers do take their own time, it becomes important to add sufficient sleep stage. Additionally I would build a safeguarding around the send email action to ensure it only fails when mail exchange server doesn't get fully restored.

Do you have snips of how the exception route is handled for your send email page, I would do something like this: 

35409.png

------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

AlexTraynor1
Level 3

Hi @Mukesh Kumar thanks for the help

Here is a screenshot of how it is handled, this page is supposed to move the email into a subfolder, mark as read, and categorise into the red category.

Would you think this requires more sufficient sleep stages or there is some other issue?

35413.png

ewilson
Staff
Staff

@AlexTraynor

Have you tried running this on your local machine so you can see if any pop-ups are being displayed by Outlook?

Cheers,

Eric

AlexTraynor1
Level 3

Hi @ewilson  thanks for the help

I haven't been able to run it on my personal computer if that's what you mean, though I can see on the run on the virtual machine that there do not appear to be any pop ups.

Thanks

Alex

Mukeshh_k
MVP

Hi @Alex Traynor ,

Can I ask what does the page number 1.1 does - does it open the outlook desktop launch? it works through server you don't actually need to launch outlook desktop as this VBO uses the outlook interlop libraries to interact with outlook in background to move an email by its message ID, also regarding the sleep stages - can you create a sub-page for moving the email actions and safeguard it and call that sub-page whenever necessary it gives you a clear picture and better exception handling.

let me know if you still face issues after implementing the above suggested. Additionally if this still persists I would be happy to set up a quick teams call to see through this.

35415.png

35416.png

35417.png

------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar