• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Accessing Subfolders in OE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing Subfolders in OE


  • Subject: Accessing Subfolders in OE
  • From: "Bob.Kalbaugh" <email@hidden>
  • Date: Wed, 08 Aug 2001 20:51:34 -0500

Hi All,

Can anyone tell me if there is a way to access subfolders in OE other than
hardwiring the path, ie:folder "This" of folder "That", or with error traps?
This is the only thing I can get to work and I'm not sure if its a good, or
the right, approach. (I'm taking baby steps here, so please don't knock me
over.)

tell application "Outlook Express"
set folderList to the name of every folder

-- result {"Inbox", "Outbox", "Sent Items", "Deleted Items", "Drafts",
"Filed Mail"}

-- Yikes! only returns top level folders!??? Why?
-- Subfolder - not in OE dictionary
-- Parent - doesn't help or doesn't pertain
-- every folder of every folder doesn't work

So I'm trapping for subfolders with...

set subFolderList to ""
repeat with x in folderList
try
set subFolderList to subFolderList & name of every folder of folder (x as
string) as list
on error -- folder doesn't have subfolder(s)
end try
end repeat
set completeFolderList to folderList & subFolderList
end tell

That works. (give myself a cookie)

Result of completeFolderList {"Inbox", "Outbox", "Sent Items", "Deleted
Items", "Drafts", "Filed Mail", "Bob", "Mary", "Ted", "Alice"}

But...(cookie yukky)

1. It only contains one level of subfolders. (okay I guess, I don't have
sub-subfolders)

2. I have to use error traps to get the folder ID of the chosen folder!
(which is another long set of instructions)

It's an awful lot of code just to get to a folder id. I like the idea of
choosing a folder to process from a list (I don't have to hardwire a path
and the script becomes flexible) Surely I'm missing something, right? Am I
starting out in the wrong direction with "name of every folder"? and again,
why does OE only return top level folders with that statement and not
subfolders?

Can someone be kind enough to offer me a clue. An alternate approach for
obtaining my list? Or is there no other way?

This AS toddler thanks you!

bob.kalbaugh


  • Follow-Ups:
    • Re: Accessing Subfolders in OE
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Compiling Classic osaxen in OS X
  • Next by Date: Re: move folder & copy image ? (newbie)
  • Previous by thread: Re:Getting comments as a list... Delimiters??? *GROWING*
  • Next by thread: Re: Accessing Subfolders in OE
  • Index(es):
    • Date
    • Thread