J
John Douglas
I am trying to loop thru all messages in my inbox with the following code:
Dim tempMailItem As Outlook.MailItem
Dim iBox As Outlook.MAPIFolder
Dim LastTim As Date
Set iBox = Application.Session.GetDefaultFolder(olFolderInbox)
iBox.Items.Sort "[Received]"
For Each tempMailItem In iBox.Items
Debug.Print tempMailItem.Subject
Next
It makes it thru a fair amount of the items but it always finds a type
mismatch. Any clue why or what I can do to? Is there a variable I could
use to try to find all items (Not just mail items) in the inbox? Thank you.
Dim tempMailItem As Outlook.MailItem
Dim iBox As Outlook.MAPIFolder
Dim LastTim As Date
Set iBox = Application.Session.GetDefaultFolder(olFolderInbox)
iBox.Items.Sort "[Received]"
For Each tempMailItem In iBox.Items
Debug.Print tempMailItem.Subject
Next
It makes it thru a fair amount of the items but it always finds a type
mismatch. Any clue why or what I can do to? Is there a variable I could
use to try to find all items (Not just mail items) in the inbox? Thank you.