Click here to Skip to main content
15,888,254 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900