简体   繁体   中英

Ways to force open local html file in internet explorer

How do i force open an html file saved on desktop to open in internet explorer assuming the default browser is chrome.

Or if it is possible to make ms word hyperlink open website links in internet explorer will also be acceptable.

thx

You would need something like a shell script to open the Internet Explorer executable. The OS will automatically open the default browser from any hyperlink, so it won't be possible to do with a simple hyperlink from within Microsoft Word. However, you could probably use VBA to do so. Here's an example of opening a file with Internet Explorer from VBA: How to code vba to open internet explorer in new session? .

You can do it on CMD or copy this in a test.bat

"C:\Program Files\Internet Explorer\iexplore.exe" D:\frogger\index.html`

If you want to call IE from word, just create a Hyperlink with

C:\Program Files\Internet Explorer\iexplore.exe

But I don't know any way to open with this a specific file in IE.


EDIT:
If you want to do this on your local PC you could do it like this:

  1. Create a test.bat like shown above.
  2. Create a Hyperlink into your word-Document to your test.bat

With this you should open your HTML-file in IE started from Word.
If you want to to this in your network it should work too if you use a networkpath for your test.bat

You can right click on the HTML file . Select properties and then change it to internet explorer or ms word as u wish.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM