在 Mac 上编写 Office Outlook 2016 脚本
Scripting Office Outlook 2016 on Mac
我想在 Mac 上 自动化 Outlook 2016。
我想自动执行的任务基本上如下:
- 在收件箱中搜索上周具有特定
标题中的模式
- 准备一封新邮件,内容是所有邮件的综合内容
上一步找到的邮件
- 让邮件打开(或处于草稿状态)让我在发送之前对其进行编辑
好吧,我就是不知道怎么处理...
- Visual Basic(我的首选)似乎根本不存在
Mac 上的 Outlook 2016!!我什至找不到 VB 编辑器(而我
找到它例如excel).
- AppleScript 可能允许这样做。但我就是找不到
关于前景的文档 API。另外,它似乎只允许非常
基本自动化。
- 自动化器?
请注意,我可以访问 windows 机器。所以,我有可能(虽然很痛苦)在那里写一个 VBA 脚本,然后 "transfer it" 到 Mac。
我没有 Office 365。
感谢您的帮助!
西尔万
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
如果您还没有找到它,您可以通过从“文件”菜单中选择 "Open Dictionary" 并选择 Microsoft Outlook 应用程序来打开 Outlook 的脚本字典。
我想在 Mac 上 自动化 Outlook 2016。
我想自动执行的任务基本上如下:
- 在收件箱中搜索上周具有特定 标题中的模式
- 准备一封新邮件,内容是所有邮件的综合内容 上一步找到的邮件
- 让邮件打开(或处于草稿状态)让我在发送之前对其进行编辑
好吧,我就是不知道怎么处理...
- Visual Basic(我的首选)似乎根本不存在 Mac 上的 Outlook 2016!!我什至找不到 VB 编辑器(而我 找到它例如excel).
- AppleScript 可能允许这样做。但我就是找不到 关于前景的文档 API。另外,它似乎只允许非常 基本自动化。
- 自动化器?
请注意,我可以访问 windows 机器。所以,我有可能(虽然很痛苦)在那里写一个 VBA 脚本,然后 "transfer it" 到 Mac。 我没有 Office 365。
感谢您的帮助!
西尔万
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
如果您还没有找到它,您可以通过从“文件”菜单中选择 "Open Dictionary" 并选择 Microsoft Outlook 应用程序来打开 Outlook 的脚本字典。