How to set the default browser in word addin

孤街醉人 提交于 2019-12-14 04:21:08

问题


Given that we have the below hyperlink in the word add in HTML page (e.g. Home.html):

<a href="www.google.com" target="_blank">Go to google</a>

Clicking on "Go to google" opens www.google.com using Internet Explorer outside the Word add-in.

The problem is the default browser is set to Google Chrome and we wish to open all the external links using the default browser set by the user.

How can we achieve this?


回答1:


As Marc points out, it’s not possible today. That being said, there is an API being developed that will do just that. I can’t comment on the timing yet, but it is “soon”. I recommend you ping this thread in a few weeks, and there may be more info to share.




回答2:


It isn't possible to define which browser opens a link. When you open a new window using target="_blank" you are simply asking the current browser to open that destination in a new window within the same browser application.

Since Office for Windows hosts add-ins in an embedded IE 11 instance, this will always be Internet Explorer.



来源:https://stackoverflow.com/questions/46906863/how-to-set-the-default-browser-in-word-addin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!