Search code examples
outlookoutlook-web-addins

Outlook Web Add-In browser preference (to open url)


I'm building an outlook web add-in that has a reference to a website (a click on a url) and in some computers it will open in an outlook embedded browser (which is very annoying and always opens in the same position and with the same size), but in others it will open on the default browser. Does anyone know how to get around this? I've seen a few questions here like Outlook Web Add-In: Change the embedded browser and open browser of your choice How to set default browser for an add-in but none of these are the problem I have.

Thank you


Solution

  • This link explains which browser is used for your addin. In Windows, it depends on both Windows and Office version: https://learn.microsoft.com/en-us/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins

    For cases where, Edge is used, urls open in a dialog window (instead of default browser) when the url is the same or a subdomain of the source location, or when the url is in the AppDomains of the addin manifest https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/manifests#app-domains. To work around this to open the url in browser window, you can try openBrowserWindow discussed here https://github.com/OfficeDev/office-js/issues/712.