Hi,
I have a folder called Inbox, and there are about 12 subfolders under that,
Is there a way to get the count of all the emails in each folder?
Arvind
Hi,
I have a folder called Inbox, and there are about 12 subfolders under that,
Is there a way to get the count of all the emails in each folder?
Arvind
Hey There.
There is absolutely a way to do this. You'll want to add a function to your Outlook Module.
You'll start by defining a variable of type MAPIFolder to access your Inbox. Next, you'll create a second variable of type MAPIFolder to access each subfolder. Also create a variable to store the total of each folder.
You'll set your Inbox variable using GetDefaultFolder(olFolderInbox).
Set your TotalCount variable equal to your Inbox's .Items.Count.
Run a loop using a For Each subfolder In Inbox.Folders.
Add your subfolder.Items.Count to your current TotalCount.
Loop to the next subfolder.
If you need more help, let me know.
Scott