Creating Outlook Contacts via Applescript

ε祈祈猫儿з 提交于 2019-12-25 06:59:46

问题


I'm trying to create an Outlook contact via Applescript. The script looks like this:

tell application "Microsoft Outlook" to make new contact with properties {first name:"test1", last name:"test2", email addresses:{{address:"work@mywork.com", type:work}, {address:"home@myhome.com", type:home}}}

The Outlook dictionary tells me that I got the class name ("contact") and the field names right. But upon saving the script I'm told: expected class name, but got property and the first "name" is highlighted. Strangely enough this error goes away if I remove the space between "first" and "name" (and "last" and "name"). Then I can save it, but upon executing I get this: error "The variable „contact“ is not defined." number -2753 from "contact" (my translation, the original error message is in german). I'm using Outlook 2011 (v14.3.9 on Mavericks). What might be up there?


回答1:


Your script works. Try looking somewhere else in the script. Paste the snippet above into a new script and test it yourself.



来源:https://stackoverflow.com/questions/21478707/creating-outlook-contacts-via-applescript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!