-->

Outlook Addin window.open

2019-02-20 01:43发布

问题:

I´m new to the addins, just want to perform a simple task as creating a button with a link in the taskbar that opens a browser and that´s it.

So far created the project based on ms tutorial and everything is working great (with fixed certificate problems).

To my understand this should be as easy as to create a button with an ExecuteFuncion actions mapping to a javascript function with a window.open e.g.

function windowOpen(event)
{
    window.open("https://www.microsoft.com");
    event.completed();
}

Thanks for the help,

Regards,

André

回答1:

For security reasons, Outlook does not support window.open directly inside of Add-ins. To open a window in an Outlook Add-in you can use the displayDialogAsync API (documentation here.) We recommend this guide to understand end-to-end usage of displaying a dialog in an Add-in.