I'm currently struggeling to get my onMessageSendHandler to work on Outlook Web and Mac. When the user sends a message, I want the user to have the option to open taskpane instead of sending the mail. This works on Classic Outlook windows.
Classic Outlook windows working example
On Mac/Web I get this error:
This is my onMessageSendHandler function:
async function onMessageSendHandler(event) {
event.completed({
allowEvent: false,
errorMessage: "Do you want to open taskpane?",
cancelLabel: "Open taskpane",
commandId: "msgComposeOpenPaneButton",
sendModeOverride: Office.MailboxEnums.SendModeOverride.PromptUser
});
}
Office.actions.associate("onMessageSendHandler", onMessageSendHandler);
My LaunchEvent part in Manifest.xml:
<ExtensionPoint xsi:type="LaunchEvent">
<LaunchEvents>
<LaunchEvent Type="OnNewMessageCompose" FunctionName="onNewMessageComposeHandler"/>
<LaunchEvent Type="OnNewAppointmentOrganizer" FunctionName="onNewAppointmentComposeHandler"/>
<LaunchEvent Type="OnMessageSend" FunctionName="onMessageSendHandler"/>
</LaunchEvents>
<SourceLocation resid="WebViewRuntime.Url"/>
</ExtensionPoint>