仅 Outlook 邮件正文 return 最近的邮件
Outlook message body only return the most recent message
我知道使用 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天真地似乎不支持这个
我正在考虑使用正则表达式。
最好的方法是使用 Microsoft Graph APIs。
我知道使用 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天真地似乎不支持这个
我正在考虑使用正则表达式。
最好的方法是使用 Microsoft Graph APIs。