title: How to open an external file from HTML
body: <p>I want a list of hyperlinks on a basic html page, which point to files on our corporate intranet.</p>
  
  <p>When a user clicks the link, I want the file to open.
  They are excel spreadsheets, and this is an intranet environment, so I can count on everyone having Excel installed.</p>
  
  <p>I've tried two things:</p>
  
  <ol>
  <li>The obvious and simple thing:</li>
  </ol>
  
  <pre class="lang-html prettyprint-override"><code>&lt;a href="file://server/directory/file.xlsx"&gt;Click me!&lt;/a&gt;
  </code></pre>
  
  <ol start="2">
  <li>A <a href="/questions/tagged/vbscript" class="post-tag" title="show questions tagged &#39;vbscript&#39;" rel="tag">vbscript</a> option that I found in a Google search:</li>
  </ol>
  
  <pre class="lang-html prettyprint-override"><code>&lt;HTML&gt;
  &lt;HEAD&gt;
      &lt;SCRIPT LANGUAGE=VBScript&gt;
      Dim objExcel
  
      Sub Btn1_onclick()
      call OpenWorkbook("\\server\directory\file.xlsx")
      End Sub
  
      Sub OpenWorkbook(strLocation)
  
      Set objExcel = CreateObject("Excel.Application")
      objExcel.Visible = true
      objExcel.Workbooks.Open strLocation
      objExcel.UserControl = true
      End Sub
  
      &lt;/SCRIPT&gt;
      &lt;TITLE&gt;Launch Excel&lt;/Title&gt;
  &lt;/HEAD&gt;
  &lt;BODY&gt;
      &lt;INPUT TYPE=BUTTON NAME=Btn1 VALUE="Open Excel File"&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt; 
  </code></pre>
  
  <p>I know this is a very basic question, but I would appreciate any help I can get.</p>
  
  <p><strong><em>Edit: Any suggestions that work in both IE and Firefox?</em></strong></p>