Let's say you got 20k emails in the collection then only process 500 from the collection before performing the next task.
If I was of assistance, please vote for it to be the "Best Answer".
Original Message:
Sent: 07-04-2023 06:49
From: Shashank Kumar
Subject: Outlook VBO
Hi Sravya,
I couldn't find an option in Microsoft's documentation to only retrieve X number of emails. Here's the url
https://learn.microsoft.com/en-us/office/vba/api/Outlook.Items.Restrict
Based on the filter that you want to use, you can restrict the number of emails returned. Then you may do collection manipulation or code stage to limit the number of mails you process out of it.
But note that you will have to keep a track of the emails that you have already processed either by moving it to some other folder or some other way so that you don't process it again.
Instead of this if you read your mailbox based on a date range it might be easier as you won't have to move mails or worry about duplicate processing of emails.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
Original Message:
Sent: 07-04-2023 06:22
From: sravya chintham
Subject: Outlook VBO
Hi Shashank,
There are 6 months of backlog emails in our inbox folder. Its approximately 30k mails, we want to process them in order newest to oldest.
Putting date is bit of a challenge as we have mails from last 6 months.
Is there any possibility to read initial 500 emails from the stack?
Thank you.
------------------------------
sravya chintham
Original Message:
Sent: 07-04-2023 05:24
From: Shashank Kumar
Subject: Outlook VBO
Hi Sravya,
Instead of getting recent 100 emails you may retrieve emails for a day, few days, week and etc. So, you can process items in bunch.
You can use this action of the vbo

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
Original Message:
Sent: 07-04-2023 00:45
From: sravya chintham
Subject: Outlook VBO
Hi everyone,
Can anyone suggest how to get particular number of mails when we have thousands of mails?
Suppose I have 20000 mails in folder, I want to fetch only 100 or 200 mails from the folder.
Please suggest.
Thank you.
------------------------------
sravya chintham
------------------------------