Hello,
I'm working on a VB .NET project which must iterate through all unread messages in the inbox. I succeeded to iterate through the messages using FindItems. However, I cannot get the sender and body text information with the current code. I've found lots of code in c# using BindItems, but don't understand how they work. Can any one of you give me some sample VB .NET code I can use to make this project work! Thanks In Advance.
What I have tried:
(Part of) the code I've managed to get running ok:
Dim UnReadItems As FindItemsResults(Of Item) = Nothing
UnReadItems = ExService.FindItems(WellKnownFolderName.Inbox, shfUnread, iv)
For Each itmI As Item In UnReadItems
If TypeOf itmI Is EmailMessage Then
Dim MailItem As EmailMessage = DirectCast(itmI, EmailMessage)