1

Outlook 的所有文件夹和子文件夹(如下列表)传入 applescript 变量(selectedMessages)。

在applescript中逐一或所有文件夹传递的任何方式(使用applescript)。

Outlook邮件文件夹的文件夹结构:

SIGMACO 
   Inbox
     -McAfee Anti-Spam
   Drafts
   Sent Items
   Deleted Items
   Junk E-mail
   RSS Feeds
   Sync Issues
    -Conflicts
    -Local Failures
 ON MY COMPUTER
   Inbox
   Drafts
   Sent Items
   Deleted Items
   Junk E-mail
   archive PST
     -Deleted Items
     -Sent Items
 SMART FOLDERS
   Flagged Mail

+++++++++++++

tell application "Microsoft Outlook"
  with timeout of 8.8E+8 seconds
    set selectedMessages to every messagge of folder "deleted Items" of on my coputer
  end timeout
end tell
4

1 回答 1

1

查找列表文件夹和子文件夹的一些代码。

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

end tell
于 2014-07-18T13:59:25.570 回答