Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening in app vs. browser 1

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
0
0
US
I am linking to an excel file - it opens in a browser window - I would rather it open in excel - how can I force it to open in excel?

[conehead]
 
You can't really. Users set up their browsers in a way they want it and if their setup is such that apps launch from within the browser, that is the way they have it set up and there's nothing you can do about. Or should do about. If you have server side scripting available you can stream the file as an unknown mime type, which would force the browser to download the file and open within the application but that is about it. With simple linking you can just expect the default browser behaviour of the user when it encounters specific mime type.
 
As Vragabond said, your options are limited and you may decide that those available to you aren't worth the hassle.

However... You could probably create an ActiveX object for this, although there are many other implications in doing so and I wouldn't personally recommend it.

Another way is to use VBScript and utilise the wshell object -- but this will only work if you are running the site locally (e.g. from a user's HD or a CD-ROM or something), and will also only work in IE. Try to run it from a Webserver and it won't work. Again, there are security implications with this method but as long as you and the user are aware of them, they might not be an issue.

Let me know if this sounds like something you could use and I'll provide more info.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top