View Single Post
  #3  
Old November 16th 06, 10:15 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Count the No of Mails

This would only run in Outlook VBA, any other platform would need somewhat
different code:

Sub InboxItemsCount()
Dim oFolder As Outlook.MAPIFolder
Dim lngCount As Long

Set oFolder =
Application.GetNameSpace("MAPI").GetDefaultFolder( olFolderInbox)
lngCount = oFolder.Items.Count

MsgBox "Count of items in Inbox = " & lngCount
End Sub

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Avadivelan TCS" wrote in message
...
Dear Ken Slovak,

Ya, I need the code.


Ads