首页 > 解决方案 > AppleScript 将 Outlook 电子邮件移动到文件夹

问题描述

我已经使用下面的脚本几个月了,没有任何问题,但是最近似乎找不到我添加到 Outlook 的任何新文件夹,对于那些已经存在的文件夹仍然可以正常工作。

该脚本适用于 n 层,无需我显式定义子文件夹。

  on run {}
    tell application "Microsoft Outlook"
        activate
        set messageAccount to first exchange account
        set aMessage to selection
        set messageSender to sender of aMessage
        set senderName to name of messageSender

        try
            move aMessage to folder senderName
        on error
            display dialog senderName & " not found."
        end try

    end tell
end run

标签: outlookapplescript

解决方案


推荐阅读