If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
link Ms Outlook
Hi All,
Are there any way to link the number of emails received on particular folder? Thanks in advance for the information, Inung |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
"Bill Manville" wrote in message ... 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 Thanks for the information, Inung |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug? Outlook 2003 can't handle LDAP, but Outlook Express 6 could?? | Thomas H | General Discussion | 7 | August 6th, 2004 07:30 PM |
Unsafe Attachments | Ron | Installation & Setup | 2 | June 9th, 2004 01:55 AM |
Outlook error after moving from Outlook 2003 to Outlook 2002 | Navin | Installation & Setup | 0 | May 13th, 2004 01:51 PM |
Email link to Outlook Express | Dave Peterson | Setting up and Configuration | 0 | May 6th, 2004 03:11 AM |