Click to See Complete Forum and Search --> : Launch MS Office program from browser hyperlink
Beauchamp
03-21-2003, 04:59 AM
Hi
I'm after some javascript that will open an MS Office 2000 document in the appropriate Office program (Word, Excel etc.) from a hyperlink in a web page (IE6) instead of opening it inside the browser.
I get "Error on page" when I try using the javascript solution at Whirly Wiry Web:
http://whirlywiryweb.com/article.asp?id=%2officedocs&xml=0
Do you have a reliable alternative?
I realise there may be a solution here somewhere but I've had no joy finding anything.
Very many thanks for your assistance.
Regards
khaki
03-21-2003, 10:10 AM
Hi Beauchamp...
As long as your users have Excel (or whatever app) installed on thier own comuter, you can just do this:
<html>
<head>
<title></title>
</head>
<body>
<a href="book1.xls">open excel file</a>
</body>
</html>
is that all you are looking to do?
k
Beauchamp
03-21-2003, 10:24 AM
Hi khaki, thanks for the reply.
A normal hyperlink, as you have suggested, opens the Office program - Excel - within the browser window. This is also the case even if you use target="_blank" - it just opens another browser window with Excel inside it. Many of the Office app's toolbars are not shown making it more difficult for our users to work.
I need a script to open Excel on it's own (or Word, Powerpoint etc.) from a web page hyperlink, with the document loaded just as if double-clicking the file from Windows Explorer.
khaki
03-21-2003, 10:54 AM
Oh... I see.
I glazed right over your statement "instead of opening it inside the browser".
Sorry.
So I checked the link that you provided, and it states the following:
To accomplish the task, we will use client-side ActiveX objects that are automatically installed when Office is installed, so there's no need to do any client-side configuration to make this method work.
However, these components are not marked as 'Safe for Scripting', the result of this depends on the client's security settings.
It also makes this claim:
Personally, I'd advise against to use this kind of scripts from Internet sites.
It appears that the best-case situation for this method is on an intranet environment - although customized client-side settings must be made in advance (and if you are on an intranet... it's really much simpler to just create shared files and put them on a shared network drive. That's how we do it... so if someone knows of another way... there are a lot of us who would really love to know about it!!!).
I'll be keeping an eye on this thread for any suggested alternatives.
Sorry for providing the most basic and obvious solution in my original response (I suspected that it was far too simple to be what you were after... but you never know!).
99 44/100 percent pure and simple...(and I float!)...
k