OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

setSignatureAsync doesn't execute or executes after 5+ mins using the outlook-set-signature example. #4680

Open simonmurrell1979 opened 2 months ago

simonmurrell1979 commented 2 months ago

setSignatureAsync doesn't execute or executes after 5+ mins using the outlook-set-signature example.

Expected behavior

Add-in works perfectly in Outlook for Web, Outlook for Mac and Outlook for Windows Preview. It does not execute on Outlook Classic at all.

Current behavior

Add-in works perfectly in Outlook for Web, Outlook for Mac and Outlook for Windows Preview. It does not execute the setSignatureAsync event on Outlook Classic at all. All the task panes works 100% across all the clients (Web, Mac, Preview and Classic). Tried to write a brand-new add-in and it still doesn't execute the event. Tried the outlook-set-signature example on Outlook Classic and it inserts the signature 5+ mins later.

Steps to reproduce

Created a brand new add-in to see if it did the same thing. I then tried to add "OnMessageCompose" as an additional event to see if it worked or not. I then added outlook-set-signature and it worked 100% but it only inserted the "mock" signature 5+ minutes later. Are there any logs inside of Outlook Classic which I can use to debug the TypeScript. I have sideloaded the add-in but it never bounds to the breakpoints. I

Provide additional details

Here is the code from the command.ts

/*

/ global Office /

Office.onReady(() => { // If needed, Office.js is ready to be called. });

/**

function checkSignature(event: Office.AddinCommands.Event) {

Office.context.mailbox.item.body.setSignatureAsync("Test", { coercionType: "html" }, function(asyncResult) { if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { console.log("setSignatureAsync succeeded"); } else { console.error(asyncResult.error); } });

event.completed();

}

// Register the function with Office. Office.actions.associate("action", action); Office.actions.associate("checkSignature", checkSignature);

Here is the code from the manifest file.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

005907fb-243c-4ada-9362-cd3dd2b3d45d 1.0.0.3 Contoso en-US https://www.contoso.com
250
ReadWriteMailbox false