gpt4 book ai didi

office-addins - 如何从 Excel 加载项中识别 Office 365 用户帐户

转载 作者:行者123 更新时间:2023-12-04 13:45:15 31 4
gpt4 key购买 nike

我想了解是否有任何 API 可以帮助我们从我的 Excel 加载项 javascript 代码中找到 Office 365 用户帐户信息。例如-假设拥有 Office 电子邮件帐户 abc@xyz.com 的用户启动 Excel,从 Office 商店下载我的加载项并使用它。我想从我的应用程序中为下载/使用我的应用程序的各种用户捕获此用户信息。Office 应用程序中是否有 API 可以实现此目的?

最佳答案

不,Word/Excel/PowerPoint 的 Office 加载项中目前没有 API 可以公开登录到 Office 客户端的用户的用户信息。

在 Outlook 加载项中,您可以检索此信息。

// Example: Allie Bellew
console.log(Office.context.mailbox.userProfile.displayName);

// Example: allieb@contoso.com
console.log(Office.context.mailbox.userProfile.emailAddress);

参见 userProfile object documentation获取更多信息。

关于office-addins - 如何从 Excel 加载项中识别 Office 365 用户帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37071639/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com