question

DanielOstkamp-4150 avatar image
0 Votes"
DanielOstkamp-4150 asked DanielOstkamp-4150 commented

"Object doesn't support property or method 'getTypeAsync'" issue

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?



office-addins-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I think I already found the issue, as indeed getTypeAsync is only available in compose mode.
Instead I can use the getAsync function.

0 Votes 0 ·

0 Answers