skip to Main Content

Javascript – Error calling Office.context.mailbox.item.body.getTypeAsync when reading an Outlook message

I'm creating my first Outlook Web Add-in app. When I'm calling Office.context.mailbox.item.body.getTypeAsync when viewing an email in Outlook, I get the error message "Uncaught TypeError: Office.context.mailbox.item.body.getTypeAsync is not a function": (function () { Office.onReady(function () { Office.context.mailbox.item.body.getTypeAsync((typeResult) => { if…

VIEW QUESTION

Visual Studio Code – Office.context.mailbox.item.subject.getAsync is not a function

Requirement: Get email subject from outlook inbox by outlook add-in API. Environment: Outlook add-in (sideload) "Mailbox" MinVersion="1.1" Visual studio code Code: async function ReadEmailSubject() { document.getElementById("email-subject").innerText = ""; Office.context.mailbox.item.subject.getAsync(function (result) { var emailSubjectDiv = document.getElementById("email-subject"); if (result.status === Office.AsyncResultStatus.Succeeded) {…

VIEW QUESTION
Back To Top
Search