zabiullakhan
Active Member
- Joined
- Aug 30, 2010
- Messages
- 310
I have this code which gives me only the count of my inbox email.. how can i modify to count my achive forlder or sent items or personal folders with specific name(ex: "office","Personal","Bank") etc..
Please help..
Code:
Sub CountInbox()
Dim olApp As Outlook.Application
Dim olNs As NameSpace
Dim Fldr As MAPIFolder
Set olApp = New Outlook.Application
Set olNs = olApp.GetNamespace("MAPI")
Set Fldr = olNs.GetDefaultFolder(olFolderInbox)
MsgBox Fldr.Items.Count
Set Fldr = Nothing
Set olNs = Nothing
Set olApp = Nothing
End Sub