Macos 如何通过AppleScript将文件附加到Microsoft Outlook中的新邮件?
以下脚本在升级到Office 365和OSX 10.10之前运行良好:Macos 如何通过AppleScript将文件附加到Microsoft Outlook中的新邮件?,macos,outlook,applescript,Macos,Outlook,Applescript,以下脚本在升级到Office 365和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 tel
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
但现在它给出了以下错误消息:
执行错误:Microsoft Outlook在保存更改的记录属性时出错。(-2700)
过程是否已更改,或者这是OSX或Outlook中的错误?路径必须是别名或posix文件 按如下方式转换posix路径:
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
谢谢,我一拿到mac电脑就会试试这个!