<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Rereading that, I realize I… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46612#M2554</link>
    <description>&lt;P&gt;Rereading that, I realize I should have put an example in. This would go between the dataTableColumns.Add section and the start of the For Each loop. &amp;nbsp; 'Due to the filter string, this is stored as a dynamic COM object. Any modification to a mail item (IE mark read, move, delete) will cause the array length to change and will break the for each.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;Requeue:
Dim folderItems = If(Filter_Expression """", folder.Items.Restrict(Filter_Expression), folder.Items)
if Oldest then
	folderItems.Sort(""[SentOn]"",False)
else
	folderItems.Sort(""[SentOn]"",True)
end if&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;In the middle of that loop, you'd have it check to mark as read. &lt;/P&gt;
&lt;PRE class="language-markup"&gt;if MarkRead = True then
	item.UnRead=0
end if&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;By the time you get to the very end of the loop, you may have also deleted or moved it. All of these need to be checked, assuming you allow for those inputs.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;	if MarkRead or Delete or moveTo """" then
		goto Requeue
	end if
Next&lt;/PRE&gt;
&lt;P&gt;It's a hack, but it works. And if you haven't had to modify one of those mails, then the For Each should just continue as it was.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2019 20:57:00 GMT</pubDate>
    <dc:creator>AmiBarrett</dc:creator>
    <dc:date>2019-02-01T20:57:00Z</dc:date>
    <item>
      <title>New Outlook VBO not picking up random emails</title>
      <link>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46609#M2551</link>
      <description>Anyone else have this issue? It will pick up and read most emails, but randomly will leave one and never be able to see it. If I open and close outlook, it will then see the email? Very frustrating behaviour</description>
      <pubDate>Fri, 01 Feb 2019 18:27:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46609#M2551</guid>
      <dc:creator>ToddMunkman</dc:creator>
      <dc:date>2019-02-01T18:27:00Z</dc:date>
    </item>
    <item>
      <title>Can you describe how you are…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46610#M2552</link>
      <description>Can you describe how you are retrieving the email, such as what action/inputs you're using?
I haven't seen this behavior, but I'd like to try reproducing it. There can be some issues depending on the inputs you use, such as that I believe you have to give UTC date time for the date time inputs, and if you're trying to get by sender, it sometimes won't resolve the sender name/email properly. But even that stuff I haven't seen actually prevent retrieving the email, as it is more just that the inputs don't match the email.
Let me know and I'll test it too with similar conditions to what you're doing.</description>
      <pubDate>Fri, 01 Feb 2019 18:59:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46610#M2552</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2019-02-01T18:59:00Z</dc:date>
    </item>
    <item>
      <title>I ran into this after I…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46611#M2553</link>
      <description>I ran into this after I modified the Get Mail action to modify various mails on read. For example, mark as read/unread, move, task/untask. If one of the messages gets modified, the array of objects is dumped and refilled.
For example. If you have it set to mark as read, but only pull unread messages, your array access will look something like this (in respect to the original array):
0,2,5,9
0th mail is marked as read, so get the info again. 1st mail becomes index 0, but your loop is looking at what's now index of 1 (and was previously index of 2).
This is the only scenario I've seen it drop messages. If that's indeed what's going on, you need to modify it further to jump back to the construction of the loop and just keep hitting index 0 until no data remains.</description>
      <pubDate>Fri, 01 Feb 2019 20:25:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46611#M2553</guid>
      <dc:creator>AmiBarrett</dc:creator>
      <dc:date>2019-02-01T20:25:00Z</dc:date>
    </item>
    <item>
      <title>Rereading that, I realize I…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46612#M2554</link>
      <description>&lt;P&gt;Rereading that, I realize I should have put an example in. This would go between the dataTableColumns.Add section and the start of the For Each loop. &amp;nbsp; 'Due to the filter string, this is stored as a dynamic COM object. Any modification to a mail item (IE mark read, move, delete) will cause the array length to change and will break the for each.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;Requeue:
Dim folderItems = If(Filter_Expression """", folder.Items.Restrict(Filter_Expression), folder.Items)
if Oldest then
	folderItems.Sort(""[SentOn]"",False)
else
	folderItems.Sort(""[SentOn]"",True)
end if&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;In the middle of that loop, you'd have it check to mark as read. &lt;/P&gt;
&lt;PRE class="language-markup"&gt;if MarkRead = True then
	item.UnRead=0
end if&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;By the time you get to the very end of the loop, you may have also deleted or moved it. All of these need to be checked, assuming you allow for those inputs.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;	if MarkRead or Delete or moveTo """" then
		goto Requeue
	end if
Next&lt;/PRE&gt;
&lt;P&gt;It's a hack, but it works. And if you haven't had to modify one of those mails, then the For Each should just continue as it was.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 20:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46612#M2554</guid>
      <dc:creator>AmiBarrett</dc:creator>
      <dc:date>2019-02-01T20:57:00Z</dc:date>
    </item>
    <item>
      <title>I'm not doing anything other…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46613#M2555</link>
      <description>I'm not doing anything other than retrieving emails with the ""Get Received Items(Basic)"". This doesn't require any date time inputs, although you can use them.&amp;nbsp;
The only inputs I'm using are
Include Read&amp;nbsp; - False
Include Unread - True
Sub Folder - My Subfolder
This works 99% of the time. However, randomly it will not see an email. This may only be one occur during a day. The only way I can find the email, is if I either open Outlook, or move the mail to another folder and back. Its like its in limbo. Makes zero sense.
I find it absolutely backwards to add a process to open and close outlook, just to guarantee I receive all emails.&amp;nbsp;</description>
      <pubDate>Mon, 04 Mar 2019 09:47:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/New-Outlook-VBO-not-picking-up-random-emails/m-p/46613#M2555</guid>
      <dc:creator>ToddMunkman</dc:creator>
      <dc:date>2019-03-04T09:47:00Z</dc:date>
    </item>
  </channel>
</rss>

