【问题标题】:How do I attach a file to a new message in Microsoft Outlook via AppleScript?如何通过 AppleScript 将文件附加到 Microsoft Outlook 中的新邮件?
【发布时间】:2015-11-10 05:04:02
【问题描述】:

以下脚本在升级到 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 中的错误?

【问题讨论】:

    标签: macos outlook applescript


    【解决方案1】:

    路径必须是别名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就试试这个!
    猜你喜欢
    • 2016-08-16
    • 1970-01-01
    • 1970-01-01
    • 2018-10-21
    • 2016-08-29
    • 2020-11-21
    • 2021-02-04
    • 1970-01-01
    • 2023-03-11
    相关资源
    最近更新 更多