【问题标题】:Scripting Office Outlook 2016 on Mac [closed]在 Mac 上编写 Office Outlook 2016 脚本 [关闭]
【发布时间】:2016-05-24 23:35:26
【问题描述】:

我想在 Mac 上自动化 Outlook 2016。

我想自动化的任务基本上如下:

  • 在收件箱中搜索前一周具有特定 标题中的图案
  • 准备一封新邮件,内容是所有邮件的合并内容 在上一步中找到的邮件
  • 让邮件打开(或草稿)让我在发送之前对其进行编辑

好吧,我只是不知道如何处理它......

  • Visual Basic(我的首选选项)似乎根本不存在 在 Mac 上的 Outlook 2016 中!!我什至找不到 VB 编辑器(而我 确实找到它,例如优秀)。
  • AppleScript 可能允许这样做。但我只是没有找到任何 Outlook API 上的文档。另外,它似乎只允许非常 基本自动化。
  • 自动机?

请注意,我可以访问 Windows 机器。因此,我有可能(尽管很痛苦)在那里编写 VBA 脚本并将其“传输”到 Mac。 我没有 Office 365。

感谢您的帮助!

西尔万

【问题讨论】:

    标签: vba macos outlook applescript


    【解决方案1】:

    这在 AppleScript 中是非常可能的。这是一个基本的例子:

    tell application "Microsoft Outlook"
    
        set theContent to ""
        set theMessages to messages of folder "Inbox" of default account
        repeat with theMessage in theMessages
            if subject of theMessage contains "match this string" then
                set theContent to theContent & plain text content of theMessage
            end if
        end repeat
    
        set theMessage to make new outgoing message with properties {subject:"the subject line", plain text content:theContent}
        make new recipient with properties {email address:{address:"recipient@somewhere.com", name:"Lumpkin Skinbark"}} at end of to recipients of theMessage
        open theMessage -- for further editing
    
    end tell
    

    如果您还没有找到它,您可以通过从“文件”菜单中选择“打开字典”并选择 Microsoft Outlook 应用程序来打开 Outlook 的脚本字典。

    【讨论】:

    • 非常感谢@Steve!这正是我开始所需要的!从你的脚本开始,我设法得到了我想做的第一个版本。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-11
    • 1970-01-01
    • 2011-08-27
    • 2011-03-03
    • 2011-07-30
    • 2017-06-11
    • 1970-01-01
    相关资源
    最近更新 更多