Speed up Outlook script for getting mailboxes
Speed up Outlook script for getting mailboxes
- Subject: Speed up Outlook script for getting mailboxes
- From: Beatrix Willius <email@hidden>
- Date: Mon, 14 Feb 2011 11:34:41 +0100
Hi,
the script below gets all mailboxes and their paths from Outlook. But with around a minute for 100 mailboxes this is way too slow. Does anyone have an idea how to make this faster?
global AllFolders
set AllFolders to {}
global ContainerName
set ContainerName to ""
tell application "Microsoft Outlook"
set allMailFolders to get mail folders
repeat with currentFolder in allMailFolders
set FolderName to name of currentFolder
set PathSoFar to ""
if FolderName is not missing value and (container of currentFolder is not missing value or account of currentFolder is not missing value) then
set ContainerName to ":"
set theContainer to currentFolder
repeat while ContainerName is not ""
set ContainerName to ""
try
set theContainer to container of theContainer
set ContainerName to name of theContainer
if ContainerName is missing value then
set theAccount to account of theContainer
if theAccount is not missing value then
set AccountName to name of theAccount
set PathSoFar to (AccountName) & ":" & PathSoFar
end if
else
set PathSoFar to (ContainerName) & ":" & PathSoFar
end if
end try
end repeat
set end of AllFolders to {PathSoFar & ":" & (FolderName)}
end if
end repeat
return allFolders
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden