Title: Re: Find number of Emails in Ent 2004
Actually that script, and Barry's, only counts local folders "On My Computer". It doesn't include IMAP folders, or Hotmail or Exchange. My script Server Usage X will do those - one at a time, since it's usually used for people who want to know how much space on a server is taken or free.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

PLEASE always state which version of Microsoft Office you are using - **2004**, X  or 2001. It's often impossible to answer your questions otherwise.



From: Dan Frakes <[EMAIL PROTECTED]>
Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
Date: Fri, 26 Nov 2004 13:08:50 -0800
To: Entourage-Talk <[EMAIL PROTECTED]>
Subject: Re: Find number of Emails in Ent 2004

On 11/25/2004 2:12 AM, "Barry Wainwright" wrote:
>> Whats a quick way of finding out how many emails you have in all folders?
>
> With a script like this. For me it gives this answer:

I still use the following script, written way back when by Allen Watson and Dan Crevier. It creates a new email message that lists all your folders, the number of messages in each, and the total number of messages:

global theReport, pad
property pad_length : 4
property line_length : 50
property padchars : "............................................................"

on run {}
    set theReport to ""
    set pad to ""
    set {msgCount, folderCount} to ProcessFolder(application "Microsoft Entourage")
    set theReport to theReport & return & "There are a total of " & msgCount & ¬
        " messages in " & folderCount & " folders"
    set theDate to (current date) as string
   tell application "Microsoft Entourage" to make new draft window with properties {subject:"Folder Listing on " & theDate, content:theReport}
    beep 3
end run

on ProcessFolder(theFolder)
    tell application "Microsoft Entourage"
        set folderCount to count folders of theFolder
       set folderList to the folders of theFolder
       set messageCount to 0
        if (count of folders of theFolder) > 0 then
           repeat with f in folderList
               set aline to pad & name of f
               set msgC to count message of f
               set toAdd to line_length - (length of aline) - (length of (msgC as text))
                set aline to aline & (text 1 thru toAdd of padchars) & msgC & return
               set theReport to theReport & aline
               set pad to pad & text 1 thru pad_length of padchars
               set {mc, fc} to my ProcessFolder(f)
                try
                   set pad to text (pad_length + 1) thru -1 of pad
               on error
                   set pad to ""
                end try
               set folderCount to folderCount + fc
               set messageCount to messageCount + msgC + mc
           end repeat
       end if
       return {messageCount, folderCount}
    end tell
end
ProcessFolder

Reply via email to