通过 Applescript 创建 Outlook 联系人 [英] Creating Outlook Contacts via Applescript

查看:30
本文介绍了通过 Applescript 创建 Outlook 联系人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 Applescript 创建 Outlook 联系人.脚本如下所示:

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}}}

Outlook 字典告诉我我得到了类名(联系人")和字段名.但是在保存脚本时,我被告知:预期的类名,但是得到了属性并且第一个名称"被突出显示.奇怪的是,如果我删除first"和name"(以及last"和name"之间的空格),这个错误就会消失.然后我可以保存它,但是在执行时我得到了这个:错误未定义变量接触"."来自联系人"的编号 -2753(我的翻译,原始错误消息是德语).我使用的是 Outlook 2011(小牛队上的 v14.3.9).上面可能有什么?

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?

推荐答案

您的脚本有效.尝试在脚本中寻找其他地方.将上面的代码片段粘贴到一个新脚本中并自行测试.

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

这篇关于通过 Applescript 创建 Outlook 联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆