Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Outlook Script: How to get the number of item in current folder (http://www.outlookbanter.com/outlook-vba/62159-outlook-script-how-get-number.html)

bbnimda November 29th 07 11:23 AM

Outlook Script: How to get the number of item in current folder
 
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......?cou nt]

thks

--
http://bensoft.miniville.fr/tra



Sue Mosher [MVP-Outlook] November 29th 07 12:56 PM

Outlook Script: How to get the number of item in current folder
 
You were so close to answering your own question:

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

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"bbnimda" wrote in message ...
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......?cou nt]

thks

--
http://bensoft.miniville.fr/tra




All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com