10-10-2009, 02:15 AM
Hi, I have written the Script to count the number of mails in a given folder in Outlook as like this.
but my doubt is, I want to check the count of not the default folders of the Outlook, where as I need to count all the mails in my Personal folders too.
How can I change my code?
Thanks in Advance.
Code:
Set olApp = CreateObject("Outlook.Application")
Set olns = olApp.GetNameSpace("MAPI")
Set Folder = olns.GetDefaultFolder(3)
msgbox Folder.Items.Count
but my doubt is, I want to check the count of not the default folders of the Outlook, where as I need to count all the mails in my Personal folders too.
How can I change my code?
Thanks in Advance.