Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Get  Total  Size  and  Number  of  Items  in  an  Outlook  Folder  

 Content of Get Total Size and Number of Items in an Outlook Folder.vbs
MD5 Hash: 717FD36A0A0E5E27C2A9956E2A79C60E
Const olFolderInbox = 6
Const olFolderSentMail = 5

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")

Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox)
Set colItems = objFolder.Items
Wscript.Echo "No. of items in Inbox: " & colItems.Count

For Each objItem in colItems
intSize = intSize + objItem.Size
Next

Wscript.Echo "Size of Inbox: " & Int(intSize / 1024) & " KB"

intSize = 0

Set objFolder = objNamespace.GetDefaultFolder(olFolderSentMail)
Set colItems = objFolder.Items
Wscript.Echo "No. of items in Sent Mail folder: " & colItems.Count

For Each objItem in colItems
intSize = intSize + objItem.Size
Next

Wscript.Echo "Size of Sent Mail folder: " & Int(intSize / 1024) & " KB"



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a