gpt4 book ai didi

macos - 如何通过 AppleScript 将文件附加到 Microsoft Outlook 中的新邮件?

转载 作者:行者123 更新时间:2023-12-04 00:17:37 32 4
gpt4 key购买 nike

在升级到 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

关于macos - 如何通过 AppleScript 将文件附加到 Microsoft Outlook 中的新邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32052438/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com