I have code that reads emails. in access, from a users inbox and it is working great but it is reading emails that are newest first. Is there a way to make it read the oldest email first?
Here is a sample of the code:
Set OlApp = CreateObject("Outlook.Application")
Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFolderInbox)
Set Inbox = OlApp.GetNamespace("Mapi").Folders("Email Account").Folders("Inbox")
DoCmd.GoToRecord , , acNewRec
Set InboxItems = Inbox.Items
For Each Mailobject In InboxItems
If Mailobject.UnRead Then ................