【发布时间】:2013-11-28 12:18:42
【问题描述】:
我必须使用文本文件作为模板来创建 Outlook 电子邮件。我看过一些脚本,但没有像我需要的那样。在创建电子邮件之前,我还需要编辑文件的一些内容。我还需要知道放置该模板文件的最佳位置。
有一个用于创建新电子邮件的脚本,但我不知道如何从这里加载测试和编辑。
更新代码----
--read source from the file
set theFile to "/Users/eclit/Desktop/MeetingTemplate.html"
open for access theFile
set fileContents to (read theFile)
close access theFile
tell application "Microsoft Outlook"
set newMessage to make new outgoing message with properties {subject:"Hooray for automation", content:fileContents & return & return}
make new recipient at newMessage with properties {email address:{name:"Jim Shank", address:"jim.shank@example.com"}}
open newMessage
end tell
请帮忙。
【问题讨论】:
-
您使用的是哪个版本的 Mac OS X?是否可以选择 Apple Mail 而不是 Outlook?
-
您的代码来自this StackOverflow post。我建议您要么发布what have you tried,要么在careers section 中聘请众多有才华的开发人员之一
-
@adayzdone 嗯,这将是脚本。我正在使用 Mavericks 和 Outlook 11
-
现在我可以读取文件并生成电子邮件,但我仍然需要用其他字符串替换一些字符串
标签: outlook applescript outlook-addin osx-mavericks