01-27-2010, 02:53 PM
Try this
hope this helps
Code:
Set OlApp = CreateObject("Outlook.Application")
Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFolderInbox)
Set InboxItems = Inbox.Items
For Each Mail In InboxItems
If Mail.UnRead Then
...
End If
Next
hope this helps