从Windows桌面客户端上的Office应用程序启动浏览器 [英] Launching of browser from office app on Windows Desktop Client

查看:70
本文介绍了从Windows桌面客户端上的Office应用程序启动浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


从Windows桌面Outlook客户端上的办公室应用程序/加载项启动新浏览器窗口时说明Bing地图,应用程序始终在Internet Explorer中打开,无论默认情况如何系统浏览器设置。 Office app / add-in是否可以启动默认的
系统浏览器?


谢谢



解决方案

Hello SunilKG,


这是Outlook的预期行为桌面,因为它与系统IE Web浏览器控件和目标"_blank"产生的任何窗口一起使用或者不受信任的URL将是IE浏览器。要从浏览器(在你的情况下为IE)打开另一个浏览器窗口
(在你的情况下系统默认)你可以使用shell对象,但这需要更改浏览器(IE)安全设置以允许运行ActiveX对象。简单的代码可能看起来像这样......

 var shell = new ActiveXObject(" WScript.Shell"); 
shell.run(" https://www.microsoft.com");

请注意,这不是安全和优雅的方式,但正是您所要求的。你可能不应该为了方便而妥协安全。


希望这会有所帮助。



Hi,

While launching a new browser window from office app/add-in on windows Desktop Outlook Client say Bing Maps, application always opens in Internet Explorer irrespective of default System browser setting. Is there a way that office app/add-in can launch default System browser?

Thanks

解决方案

Hello SunilKG,

This would be expected behavior for Outlook Desktop as it works with system IE web browser control and any window spawned by target "_blank" or not trusted URL will be IE browser. To open from a browser (IE in your case) another browser window (system default in your case) you may use shell object, but this would require to change the browser (IE) security settings to allow to run ActiveX object. The simple code may looks like this ...

var shell = new ActiveXObject("WScript.Shell");
shell.run("https://www.microsoft.com");

Please note this is not secure and elegant way, but exactly what you asked for. You probably should not compromise security in the favor of convenience.

Hope this helps.


这篇关于从Windows桌面客户端上的Office应用程序启动浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆