【发布时间】:2018-08-20 06:25:09
【问题描述】:
我知道使用 Office JavaScript API 可以检索所选邮件的正文。
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) {
//access the message body here
}
else {
$('#subject').html(asyncResult.value.trim());
}
});
但是,在我有一系列消息来回传递的情况下(即我提出一个问题并得到回答,然后提出另一个问题并再次得到回答)我只想检索最近的一个或最近的两个消息。最好的方法是什么? Office.js 似乎并不天真地支持这一点。
我正在考虑使用正则表达式。
【问题讨论】:
标签: outlook outlook-addin office-js office-addins