我想获取用户的电子邮件来检查他在服务中的信用。最好没有任何 SSO 魔法,就像我们在 Google Docs 插件中所做的那样https://developers.google.com/apps-script/reference/base/user
userProfileemailAddress对象包含返回用户 SMTP 电子邮件地址字符串的成员。该成员可从 1.0 级别的 API 获取,使用示例可能类似于...
// Example: allieb@contoso.com
Office.initialize = function (reason) {
$(function () {
console.log(Office.context.mailbox.userProfile.emailAddress);
}
}
Run Code Online (Sandbox Code Playgroud)
请注意:当前适用于 Word/Excel/PowerPoint 的 Office.js API 不提供检索用户名/电子邮件地址的功能。
| 归档时间: |
|
| 查看次数: |
3411 次 |
| 最近记录: |