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

Visual Studio Code – VSTO Outlook: Catching Send Event

I am trying to create plug-in that will catch any send item and show warning before sent out. Currently I am using the below code private void ThisAddIn_Startup(object sender, System.EventArgs e) { Outlook.Application application = Globals.ThisAddIn.Application; application.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(Application_ItemSend);…

VIEW QUESTION
Back To Top
Search