Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Launching MS Word from web page.


Message #1 by "Cameron Moore" <cammoore@y...> on Sat, 15 Sep 2001 04:27:45
Well it depends on your scenario. You can't make the doc open outside the
browser using Word unless you have control over the user's settings such as
an intranet scenario. If this is the case you can launch include a couple of
lines of JScript (IE only) in a function and respond to the onclick event in
an <a> tag or button such as:
var oShell = new ActiveXObject("WScript.Shell");
oShell.run("winword.exe <your doc path here>");
You'll have to be careful with quotes etc. to allow for spaces in path name.
Otherwise get the user to go to folder options|file types and change the
settings for .doc files to open in application rather than IE.

Joe

----- Original Message -----
From: "Cameron Moore" <cammoore@y...>
To: "javascript" <javascript@p...>
Sent: Saturday, September 15, 2001 4:27 AM
Subject: [javascript] Launching MS Word from web page.


> I am trying to launch MS Word from a browser. I need it to open outside of
> IE so I can use the mailmerge feature. Any ideas?
>
> Thanks
>


  Return to Index