I have recently been working with the Office JavaScript API, have managed to get some data I need using it, but am having issues with getting the body of an email. Have tried a few approaches at getting the body: 1: https://dev.office.com/reference/add-ins/outlook/1.5/Body?product=outlook&version=v1.5
2:
Office.context.mailbox.item.body.getAsync(Office.CoercionType.Text,
function (result) {
console.log("Selected data: " + result.value + result.status + result.error);
}
)
function write(message){
console.log(message);
}
}
So far I have managed to get data out of emails like the subject and email address of the sender, but everytime i start doing aSync stuff - even with the code samples on Microsofts website i get the below error.
The exact error that i get is:
OSF_DDA_Error {name: "InternalFormatError", message: "There was an internal format error.", code: 9002}
Any help would be appreciated, Thanks :)