Re: Entourage folder hierarchy
Re: Entourage folder hierarchy
- Subject: Re: Entourage folder hierarchy
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 19 Jan 2003 19:04:15 -0800
On 1/19/03 6:41 PM, "Martin Schiller" <email@hidden> wrote:
>
In emailer it was
>
>
set thefolderlist to the entire folder hierarchy
>
>
Can I do the same in Entourage?
No, you have to build it yourself by a recursive handler. 'every folder'
gives you every top-level local folder, so iterating through them and
getting 'every folder of theFolder', etc. eventually gets them all. Then
there are IMAP folders - the top level folders there are 'every folder of
IMAP account 1' etc. Emailer never had to worry about IMAP folders. Hotmail
the same. There's no simple way of getting really every folder all at once,
even though they each (subfolders included) all can be referred to by a
unique ID, as 'folder id 123' or whatever without the Finder-like
hierarchical syntax you need when referring by name. ('folder "C" of folder
"B" of folder "A"). I suppose you could do it in a try block:
tell application "Microsoft Entourage"
set folderNameList to {}
repeat with i from 1 to 1000
try
set end of folderNameList to name of folder id i
end try
end repeat
end tell
I get a list of 87 folder names, including IMAP and newsgroups too! (I could
exclude the newsgroups by a whose clause.) If you want the whole "path" to
the folder, you'll need to do i by a recursive handler, piecing the levels
together.
One of the handlers (actually it's a whole set of handlers) of which I'm
proudest gets all the folders - local, IMAP, Hotmail - and newsgroups too,
and puts them into a 'choose from list' with correct indentations for each
level, just like the Entourage folder list. It took me a long time to get it
right.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.