0

I currently have an outlook add-in using Office.js and I could not find a solution on how to open a url in the computers default browser. I looked over the Open an html page in a default browser from an add-in but none of the solutions helped me where it was indicated to open a new questions if we still have issues.

Currently I have tried to open the url like this:

 <div
   className={className}
   onClick={() => window.open(url)}
 >
   {children}
 </div>

and

<a
  href={url}
  target="_blank"
  rel="noopener noreferrer"
>
  {children}
</a>

Unfortunately, both of this examples opens a office dialog with the browser embedded. The only weird issue is that on the development build, it always opened correct, but not in production. (Office 365 on windows 10)

NinetyHH
  • 1,494
  • 4
  • 19
  • 32
  • Is the url domain the same as the source url domain of the addin? That would cause the link to open a dialog. New windows are opened with Edge if it is the same domain in order to support using cookies to pass data to the window. – Outlook Add-ins Team - MSFT Dec 13 '19 at 18:17
  • @OutlookAdd-insTeam-MSFT yes, the url domain is the same as the source url domain. The explains why the development build works because is different urls. Do you have an idea how I can make it work if it's the same url? – NinetyHH Dec 13 '19 at 22:58
  • Currently this not part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered, when we go through our planning process. https://officespdev.uservoice.com/forums/224641-general/category/131778-outlook-add-ins – Outlook Add-ins Team - MSFT Dec 14 '19 at 00:20

0 Answers0