Can't get e-mails via Outlook VBO: Object variable or With block variable not set.

Alex1906

New Member
Hi everyone,

I've been running a process - in which I have to collect e-mails from Outlook - for quite few weeks without any problems, untill today.
I'm using the MS Outlook VBO => Get Received Items (Advanced) action, the Filter Expression is entered correctly. Allthough I haven't changed anything to my code, I'm constantly bumping on the following error,

Internal : Could not execute code stage because exception thrown by code stage: Object variable or With block variable not set.

I've already turned of the Cached Exchange Mode in my Outlook account settings, also did a scan of the .PST files from my Outlook account.
Has anyone got an idea how I could solve this problem?

Kind regards,

Alex
 
Last edited:

Alex1906

New Member
Problem resolved.

I deleted all the test-mails I was using to test the process. Then I used new e-mails for testing and this resolved the issue. Very odd but I guess that's often the case with Outlook VBO.
 

immadisp

New Member
I too faced this issue from last 3 days. I have close to 400 unread emails and the bot keep on failing with the above error. I marked all of them as read and kept 1 items as unread. It worked perfectly. Then, I cornered one email that BOT is having difficulty in reading the email. Other than that, I marked the rest 399 as unread. BOT picked them all. But, it failed to pick that one email for some reason. Subject have ":", "," and "-" special characters. I sent an email with the same subject to myself and read it through BOT. It did well with that too. So, the issue is not subject line. Something wrong with the body. I see an image in that email body and that might be the reason for failure.
 

anilkumar1212

New Member
I too faced this issue from last 3 days. I have close to 400 unread emails and the bot keep on failing with the above error. I marked all of them as read and kept 1 items as unread. It worked perfectly. Then, I cornered one email that BOT is having difficulty in reading the email. Other than that, I marked the rest 399 as unread. BOT picked them all. But, it failed to pick that one email for some reason. Subject have ":", "," and "-" special characters. I sent an email with the same subject to myself and read it through BOT. It did well with that too. So, the issue is not subject line. Something wrong with the body. I see an image in that email body and that might be the reason for failure.
I too faced the same error while getting the emails.
Did you got any solution for this error.?
 

Prabha

New Member
Check the inbox mail count in code level and out look mail so if the number will not be matched due to some exceptions then you need move the mails which can't read by bot example if he code count is 5 inbox count is 6 then move the last mail to some other folder and try to run the code then u can finish the bot run
 
Top