cancel
Showing results for 
Search instead for 
Did you mean: 

MS Outlook Get Received Items Basic

QuinnAnderson
Level 3
Hi,

I'm trying to run a 'Get Received Items Basic' action with the MS Outlook VBO.  But this error triggers every time I run it - Internal : Could not execute code stage because exception thrown by code stage: Object variable or With block variable not set.

I'm new to Blue Prism so I don't know if I'm missing a step or anything.  Do I need to run a step before running the Get Received Items command?  Eventually I'm planning on running some filtering but at the moment I'm just trying to test if Blue Prism can connect to my Outlook.

------------------------------
Quinn Anderson
------------------------------
12 REPLIES 12

DaveMorris
Level 14
What inputs are you using? If you are giving it any inputs, try running it with no inputs at all. It may take a bit to run if you have a lot of emails but it should work with no inputs.

Also, open the MS Outlook Email VBO, and see if there are any Errors at the top left of Object Studio in the Business Object Validation popup. Or you may just see (0) Errors which means it's fine.

I'll watch for your response. I'm not personally sure how to guess what the issue is without being able to reproduce it. So these two things above would be a good start.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

I tried running it without any inputs and got the same issue.  The VBO itself is reporting 0 errors. 

I should also note the only action that I currently have in the studio is 'Get Received Items Basic'


All the best



____________________________________

Quinn R. Anderson

Master of Advanced Analytics | Consultant | Data Scientist

Aspirent Consulting, LLC


6941.png
6600 Peachtree Dunwoody Road NE
400 Embassy Row, Suite 260
Atlanta, GA 30328
C:  (303) 324-7645
E: quinn.anderson@aspirent.com

L: www.linkedin.com/in/quinn-r-anderson-0aa3a340





------Original Message------

What inputs are you using? If you are giving it any inputs, try running it with no inputs at all. It may take a bit to run if you have a lot of emails but it should work with no inputs.

Also, open the MS Outlook Email VBO, and see if there are any Errors at the top left of Object Studio in the Business Object Validation popup. Or you may just see (0) Errors which means it's fine.

I'll watch for your response. I'm not personally sure how to guess what the issue is without being able to reproduce it. So these two things above would be a good start.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

And you have the Microsoft Interop dll in your Blue Prism Automate folder?

It should be here: C:\Program Files\Blue Prism Limited\Blue Prism Automate\Microsoft.Office.Interop.Outlook.dll

Normally it will give a different error if that is missing. It'd be something like 'the object has compile errors' or similar wording. But this dll being missing is one of the primary reasons for the object not working for people.

Also, have you attempted any of the other actions (other than Get Received Items)?

And last question for now... Do you have access to another machine where you can install Blue Prism and attempt this just to see if we can get it working on any machine you have access to?

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

I think I figured it out actually!  I do have the dll.  The problem seems to be that the Basic action requires something to filter off of.  I'd been trying to grab all my emails to make sure that the connection itself was working, but that seems to trigger this error.  When I insert a criteria for the action it runs correctly.

This has brought up a separate issue however, in that it seems like the "Sender Email" field doesn't grab anything.

------------------------------
Quinn Anderson
------------------------------

Hmm... that's weird. It shouldn't require any inputs. I just tested it again and it works for me. When you run it with no inputs, does it throw an error immediately or does it throw an error after a delay?

Another question. What kind of Account is set up in Outlook? Is it an Office 365 email account or something else?

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

There is a delay and then it throws the error.  The email is office 365.



------Original Message------

Hmm... that's weird. It shouldn't require any inputs. I just tested it again and it works for me. When you run it with no inputs, does it throw an error immediately or does it throw an error after a delay?

Another question. What kind of Account is set up in Outlook? Is it an Office 365 email account or something else?

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Have you tried this on another machine?

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

Thanks for this conversation. I removed all of the inputs and was able to get the received items. However, is it possible to get items from only one email? All emails from X@x.com for example. When I add the "sender name" or "sender email". I do not get an error I get nothing at all in the collection.

------------------------------
Barry Bell
RPA Manager
DHGLLP
America/New_York
------------------------------

Check what value is in those fields when you do 'receive' with no inputs first. Like, first run it to get a collection of the emails and then look in the results to see the exact value it shows for the email you want. Sometimes the sender name and other fields like it can be unreliable or in a different format than you'd expect. There also could sometimes be apostrophes.

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA