1

我正在开发在 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 联系人?

谢谢

4

1 回答 1

2

是的,makeEwsRequestAsync API 是使用 JS API 的一种方法。

于 2016-12-11T20:11:17.423 回答