Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script to count the number of mails in a given folder in Outlook
#1
Solved: 10 Years, 9 Months, 1 Week ago
Hi, I have written the Script to count the number of mails in a given folder in Outlook as like this.

Code:
Set olApp = CreateObject("Outlook.Application")
Set olns = olApp.GetNameSpace("MAPI")
Set Folder = olns.GetDefaultFolder(3)
msgbox Folder.Items.Count

but my doubt is, I want to check the count of not the default folders of the Outlook, where as I need to count all the mails in my Personal folders too.

How can I change my code?

Thanks in Advance.
Reply


Messages In This Thread
Script to count the number of mails in a given folder in Outlook - by Sudhamshu - 10-10-2009, 02:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting Email Body from Outlook waseem.khan.91 0 1,912 03-04-2019, 02:53 PM
Last Post: waseem.khan.91
  Extracting Email Body from Outlook waseem.khan.91 0 1,035 03-01-2019, 02:51 PM
Last Post: waseem.khan.91
  VB Script:number of times a character appears in a string with position Jyobtech 1 11,740 08-07-2013, 01:03 PM
Last Post: anil2u
  Creating a folder from within a reusable action. sd3 2 3,007 06-18-2013, 03:20 PM
Last Post: learnQtptips
  to count the number of used rows in a particular column sujaravi123 3 10,918 06-12-2013, 03:17 PM
Last Post: sujaravi123

Forum Jump:


Users browsing this thread: 1 Guest(s)