my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes open Word Document from JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "open Word Document from JavaScript" Watch "open Word Document from JavaScript" New topic

open Word Document from JavaScript

narayana Ega

Joined: Aug 23, 2012
Posts: 26
Hi All,

I tried the below code to open word document from browser ,it is ok in Internet Explorer but it is not working in Firefox and Chrome.

<script type="text/javascript">

function openWordDocPath()
var objWord;
objWord = new ActiveXObject("Word.Application");
objWord.Visible = true;
<form onSubmit="openWordDocPath()">
<input type="submit" value="submit">

Can any body help me to get out of this problem............
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
ActiveX is IE Only. Not going to happen in the other browsers.

I agree. Here's the link:
subject: open Word Document from JavaScript
It's not a secret anymore!