如何通过 AppleScript 将文件附加到 Microsoft Outlook 中的新邮件?
How do I attach a file to a new message in Microsoft Outlook via 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 tell
但现在它给出了这个错误信息:
execution error: Microsoft Outlook got an error: Error while saving the changed record property. (-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
以下脚本在升级到 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 tell
但现在它给出了这个错误信息:
execution error: Microsoft Outlook got an error: Error while saving the changed record property. (-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