Outlook Web加载项:检索联系人 [英] Outlook Web Add-In: Retrieve contacts
问题描述
我正在开发outlook365和outlook.com上运行的outlook web addin。我需要使用该网络插件创建,阅读和更新联系人。下面是将当前用户添加到 To
字段
的电子邮件。
function addToRecipients(){
va r item = Office.context.mailbox.item;
var addressToAdd = {
displayName:Office.context.mailbox.userProfile.displayName,
emailAddress:Office.context.mailbox.userProfile.emailAddress
};
if(item.itemType === Office.MailboxEnums.ItemType.Message){
Office.cast.item.toMessageCompose(item).to.addAsync([addressToAdd]);
} else if(item.itemType === Office.MailboxEnums.ItemType.Appointment){
Office.cast.item.toAppointmentCompose(item).requiredAttendees.addAsync([addressToAdd]);
}
}
有人能指出我如何使用outlook web addin检索Outlook联系人吗?
谢谢
您好umarniaz,
>>谁能指出我如何使用outlook web addin检索Outlook联系人?
据我所知,有Office加载项中没有此类API。我还检查了makeEwsRequestAsync方法,不支持获取联系人。
似乎唯一的方法是Outlook联系人休息api ,您可以参考以下链接:
#Outlook Contacts REST API参考
https:// msdn.microsoft.com/en-us/office/office365/api/contacts-rest-operations
如果这是您希望在Office插件的未来版本中包含的新功能,我建议您在以下链接中提交反馈:
http://officespdev.uservoice.com
最诚挚的问候,
Edward
I'm working on developing outlook web addin which runs on both outlook365 and outlook.com. I have a requirement to create, read and update contacts using that web addin. Below is the sample which add current user to
To
field of an email.function addToRecipients() { var item = Office.context.mailbox.item; var addressToAdd = { displayName: Office.context.mailbox.userProfile.displayName, emailAddress: Office.context.mailbox.userProfile.emailAddress }; if (item.itemType === Office.MailboxEnums.ItemType.Message) { Office.cast.item.toMessageCompose(item).to.addAsync([addressToAdd]); } else if (item.itemType === Office.MailboxEnums.ItemType.Appointment) { Office.cast.item.toAppointmentCompose(item).requiredAttendees.addAsync([addressToAdd]); } }
Can anyone point out me how i can retrieve the outlook contacts using outlook web addin ?
Thanks
解决方案Hi umarniaz,
>> Can anyone point out me how i can retrieve the outlook contacts using outlook web addin ?
As far as I know, there is no such API in Office add-ins. I also checked the makeEwsRequestAsync method, it is not supported to get contacts.
It seems the only way is Outlook contacts rest api, you could refer the link below:
# Outlook Contacts REST API reference
https://msdn.microsoft.com/en-us/office/office365/api/contacts-rest-operations
If this is a new feature you want to include in the future version of Office add-ins, I suggest you submit a feedback in the link below:
http://officespdev.uservoice.com
Best Regards,
Edward
这篇关于Outlook Web加载项:检索联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!