Outlook Script: How to get the number of item in current folder

B

bbnimda

Config: Exchange 2003 / Outlook 2003

Hi all,

I know how to get the number of item in a folder using this

Set myFolder =
Application.GetNamespace("MAPI").Folders("Folder1").Folders("Folder2")......Folders("FolderX")
NbrItem = myfolder.items.count

this is usefull when my form is in a folder and I want count Item in other
Folder, But....

I'm asking my Self, when I count the number of item in current folder is
there an easier command ?

something like
[Application.ActiveExplorer.CurrentFolder......?count]

thks
 
S

Sue Mosher [MVP-Outlook]

You were so close to answering your own question:

Set myFolder = Application.ActiveExplorer.CurrentFolder
NbrItem = myfolder.items.count
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top