在 office 365 Outlook 插件中,该方法在Outlook MacOffice.context.mailbox.item.body.getAsync()
中不起作用。但它在safari和chrome中运行良好。
office js 参考是“ https://appsforoffice.microsoft.com/lib/1/hosted/office.js ”
这是加载项读取应用程序的代码
var _item = Office.context.mailbox.item;
var body = _item.body;
// Get the body asynchronous as text
body.getAsync(Office.CoercionType.Text, function (asyncResult) {
if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
}
else {
$('#subject').html(asyncResult.value.trim());
}
});