Getting the oldest mail from Outlook

Hey guys! Sorry to trouble all of you again! I was given a one week grace to find out how to get the oldest mail message from Outlook as my automation required to get the oldest mail starting from Monday, Tuesday and Wednesday only. But I have try to sort the date on Outlook application in Ascending order, is not working and today I try this code and assign variable like this mailMessages = mailMessages.OrderBy(Function(x) DateTime.Parse(x.Headers(“Date”).ToString)).ToList, also not working…, appreciate any xaml or any solution files! Much thanks!

1 Like

When you say it’s “not working” when you use that OrderBy function what do you mean? Could you be more specific?

Buddy @phoenix123

Its working fine with this code and i tried to reproduce the same
try once in your side once please and let know for any queries or clarification
oldest.zip (2.3 KB)

Cheers