Actionscript 使用applescript在Outlook中创建带有附件的邮件

Actionscript 使用applescript在Outlook中创建带有附件的邮件,actionscript,outlook,Actionscript,Outlook,我正在尝试在Microsoft Outlook版本15.6中打开一个新的消息窗口,并填充包含附件的字段。以下是我的actionscript代码: tell application "Microsoft Outlook" set newMessage to make new outgoing message with properties {subject:"Hooray for automation"} make new recipient at newMessage with

我正在尝试在Microsoft Outlook版本15.6中打开一个新的消息窗口,并填充包含附件的字段。以下是我的actionscript代码:

tell application "Microsoft Outlook"
    set newMessage to make new outgoing message with properties {subject:"Hooray for automation"}
    make new recipient at newMessage with properties {email address:{name:"Jim Shank", address:"jim.shank@example.com"}}
make new attachment at the end of newMessage with properties {file:"/tmp/Invoice INV2 - Paul.pdf"}
    open newMessage
end tell
(此消息源于)

但是,我收到了以下错误:256:398:执行错误:Microsoft Outlook在保存更改的记录属性时出错:错误。(-2700)


是否可以使用actionscript在最新版本的Outlook中打开新邮件?

这里有一个applescript;也许会有帮助

tell application "Microsoft Outlook.app"
activate
set theFile to "Macintosh HD:Users:Shared:sp.zip"
set newMessage to make new «class outm» with properties {«class subj»:"Outlook is back"}
make new «class rcpt» at newMessage with properties {«class emad»:{name:"Mark", «class radd»:"blah@blah.com"}}
tell newMessage
    set theAttachment to make new «class cAtc» with properties {file:theFile}
    «event mailsend»
end tell
end tell

我找到了解决方案:我需要在脚本前面添加以下行:

set x to "/Users/foo/file" as POSIX file
有关详细信息,请参见本页:

可能存在的副本