我正在开发在 Outlook365 和 Outlook.com 上运行的 Outlook Web 插件。我需要使用该 Web 插件创建、读取和更新联系人。以下是将当前用户添加到To
电子邮件字段的示例。
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]);
}
}
谁能指出我如何使用 Outlook Web 插件检索 Outlook 联系人?
谢谢