Posted By: kogus
I want a list of hyperlinks on a basic html page, which point to files on our corporate intranet.
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.
I’ve tried two things:
- The obvious and simple thing:
<a href="file://server/directory/file.xlsx">Click me!</a>
- A vbscript option that I found in a Google search:
<HTML> <HEAD> <SCRIPT LANGUAGE=VBScript> Dim objExcel Sub Btn1_onclick() call OpenWorkbook("\serverdirectoryfile.xlsx") End Sub Sub OpenWorkbook(strLocation) Set objExcel = CreateObject("Excel.Application") objExcel.Visible = true objExcel.Workbooks.Open strLocation objExcel.UserControl = true End Sub </SCRIPT> <TITLE>Launch Excel</Title> </HEAD> <BODY> <INPUT TYPE=BUTTON NAME=Btn1 VALUE="Open Excel File"> </BODY> </HTML>
I know this is a very basic question, but I would appreciate any help I can get.
Edit: Any suggestions that work in both IE and Firefox?
Try formatting the link like this (looks hellish, but it works in Firefox 3 under Vista for me) :