As this is my first time writing an Office add-in, I am playing around and try to add a text to a received email (no compose mode) after the user clicks a run action (based on https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/outlook-quickstart?tabs=yeomangenerator).
However, if i follow https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/insert-data-in-the-body I get the following error:
[object Error]: {description: "Object doesn't support property or method 'getTypeAsync'", message: "Object doesn't support property or method 'getTypeAsync'", number: -2146827850, stack: "TypeError: Object doesn't support property or method 'getTypeAsync' at setItemBody (https://localhost:3000/taskpane.js:10296:3) at Anonymous function (https://localhost:3000/taskpane.js:10278:7) at step (https://localhost:3000/taskpane.js:10229:7) at Anonymous function (https://localhost:3000/taskpane.js:10160:7) at Anonymous function (https://localhost:3000/taskpane.js:10132:5) at Promise (https://localhost:3000/polyfill.js:9839:7) at Anonymous function (https://localhost:3000/taskpane.js:10111:3) at run (https://localhost:3000/taskpane.js:10268:3)"}
when calling item.body.getTypeAsync via the run function.
I set the min version of the requirement set of the Mailbox to 1.3.
Or can I only use this function when I am in compose mode?