Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Links / November 2004

Tip: Looking for answers? Try searching our database.

link Ms Outlook

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
souris - 23 Nov 2004 03:23 GMT
Hi All,

Are there any way to link the number of emails received on particular
folder?

Thanks in advance for the information,

Inung
Bill Manville - 23 Nov 2004 10:04 GMT
Souris wrote:
> Are there any way to link the number of emails received on particular
> folder?

You would need to write a Visual Basic procedure (macro) using
Automation to Outlook to get the information for you.

I guess it would go something like:

Function GetNumberOfItemsInFolder(FolderName As String)
 Dim oOut As New Outlook.Application
 Dim oNS As Outlook.NameSpace
 Dim oF As Outlook.MAPIFolder
 Set oNS = oOut.GetNamespace("MAPI")
 Set oF = oNS.Folders("Personal Folders").Folders(FolderName)
 GetNumberOfItemsInFolder = oF.Items.Count
 Set oNS = Nothing
 Set oOut = Nothing
End Function

Then in a worksheet cell you could put
=GetNumberOfItemsInFolder("InBox")

If you want it updated at each recalculate then you would need to add  
Application.Volatile
before the first Set line

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
souris - 24 Nov 2004 04:54 GMT
> Souris wrote:
>> Are there any way to link the number of emails received on particular
[quoted text clipped - 26 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup

Thanks for the information,

Inung
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.