Mariusz Adamczewski Mariusz Adamczewski - 1 year ago 103
HTML Question

HTML - Open localization via explorer.exe / file via excel

I have got hyperlink in HTML.

I used this code, for example:

<a href="//Test/Test/Test" target="_explorer.exe">Open_Me</a>

Question 1: I want to do is to open localization in explorer.exe. How I can make it?

Question 2: I need to do is to open file (excel with macro - xlsm) via hyperlink in excel.

<a href="//Test/Test/Test/Test.xlsm">Click_Me</a>

Maybe I should add something into meta? Please write What should I do.

Thank you

Answer Source

You can open same new browser by setting property target="_new", but you can't open it in different browser.
Anyvay, you can open popup window using javascript, but it is not the best.

You need to create a shared folder on your network and put the workbook there. You can then use the file:///SERVER/PATH/FILE.xls format in your <a /> links on your intranet to direct your user to the actual file on the server.

I would recommend you start by creating a simple html doc on your desktop to get familiar with the file:/// path format. Eg

    <head />
        <a href="file:///SERVER/PATH/FILE.xls">Click</a>

save that in notepad and rename the extension from .txt to .html.

You can also type file:/// paths straight into windows explorer's address bar which allow for testing paths without resorting to the html document mentioned above.

UNFORTUNATELY! It seems that the browsers default behavior is to always download a link rather than open it (even if it is a local resource), so if you actually want to open it then you must resort to changing your browser intranet permissions to allow JS to access local resources, which then allows you to use the technique below.

This article ( uses

<script type="text/javascript" language="javascript">
    function RunFile() {
    WshShell = new ActiveXObject("WScript.Shell");
    WshShell.Run("c:/windows/system32/notepad.exe", 1, false);

to open notepad. You can use command line arguments with Excel.exe ( to tell it what the file path is...

Excel.exe "C:\PATH\Excel.xls"

From here more information by @3-14159265358979323846264.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download