Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can we read mail body in compose mode using office 365 java-script API

How can we read mail at compose mode using office 365 JavaScript API?

Such as:

Office.initialize = function (reason) {
    var body = Office.context.mailbox.item.body;
};
like image 290
InfoÁsith Avatar asked Dec 05 '25 17:12

InfoÁsith


1 Answers

Edit: Good news for anyone who is looking to achieve the same scenario - we do have an API that you can use to get the body of the message in compose mode. You can find out about the new API here: https://dev.outlook.com/reference/add-ins/Body.html#getAsync


Unfortunately, there is not a clean way to achieve this right now. However, we're working on APIs all the time and it's possible that this functionality is added in the future, so please stay tuned!

The closest workaround we can get right now is for you to tell the user to save the draft, get the EWS ID, and make an EWS request to get the body, but that's not very useful, is it? :)

like image 136
MrPiao Avatar answered Dec 09 '25 20:12

MrPiao