S
salad
I have the following code.
Dim Olapp As Object
Dim Olmapi As Object
Dim Olfolder As Object
Set Olapp = GetObject(, "Outlook.Application") 'get reference
Set Olmapi = Olapp.GetNamespace("MAPI")
Set Olfolder = Olmapi.GetDefaultFolder(6) '6 for olfolderinbox
MsgBox Olfolder.name & " " & Olfolder.Items.Count
The folder name is Inbox and the count is 80. I can't figure out where
it gets the number 80. I expected the count of 30 which is what I have
in my Inbox.
In the pane Mail/Favorite Folders I have
Inbox 30
Unread 30
Sent 8
Deleted 6
In the pain PersonalFolders I have
Drafts 18
Inbox 30
Junk 51
DeletedItems 6
Sent 8
Under ArchiveFolders I have
DeletedItems 29
SentItems 5
DeletedItems (29) = Junk (51) equals 80 but that doesn't make sense.
Do you have any idea what is being tallied?
Dim Olapp As Object
Dim Olmapi As Object
Dim Olfolder As Object
Set Olapp = GetObject(, "Outlook.Application") 'get reference
Set Olmapi = Olapp.GetNamespace("MAPI")
Set Olfolder = Olmapi.GetDefaultFolder(6) '6 for olfolderinbox
MsgBox Olfolder.name & " " & Olfolder.Items.Count
The folder name is Inbox and the count is 80. I can't figure out where
it gets the number 80. I expected the count of 30 which is what I have
in my Inbox.
In the pane Mail/Favorite Folders I have
Inbox 30
Unread 30
Sent 8
Deleted 6
In the pain PersonalFolders I have
Drafts 18
Inbox 30
Junk 51
DeletedItems 6
Sent 8
Under ArchiveFolders I have
DeletedItems 29
SentItems 5
DeletedItems (29) = Junk (51) equals 80 but that doesn't make sense.
Do you have any idea what is being tallied?