本文介绍了如何通过 AppleScript 将文件附加到 Microsoft Outlook 中的新邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在升级到 Office 365 和 OSX 10.10 之前,以下脚本运行良好:
The following script worked fine before upgrading to Office 365 and OSX 10.10:
tell application "Microsoft Outlook"
set newMessage to make new outgoing message
tell newMessage
make new attachment with properties {file:"/Users/foo/file"}
end tell
open newMessage
end tell
但现在它给出了这个错误信息:
But now it gives this error message:
执行错误:Microsoft Outlook 出现错误:保存更改的记录属性时出错.(-2700)
程序是否已更改,或者这是 OSX 或 Outlook 中的错误?
Has the procedure changed or is this a bug in either OSX or Outlook?
推荐答案
路径必须是别名或posix文件.
像这样转换posix路径:
Convert a posix path like this:
set x to "/Users/foo/file" as POSIX file
-- or --> set x to "/Users/foo/file" as POSIX file as alias
tell application "Microsoft Outlook"
set newMessage to make new outgoing message
tell newMessage
make new attachment with properties {file:x}
end tell
open newMessage
end tell
这篇关于如何通过 AppleScript 将文件附加到 Microsoft Outlook 中的新邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!