Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 如何通过AppleScript将文件附加到Microsoft Outlook中的新邮件?_Macos_Outlook_Applescript - Fatal编程技术网

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

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

以下脚本在升级到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
但现在它给出了以下错误消息:

执行错误: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电脑就会试试这个!