File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "open Word Document from JavaScript" Watch "open Word Document from JavaScript" New topic
Author

open Word Document from JavaScript

narayana Ega
Greenhorn

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.


<html>
<head>
<script type="text/javascript">



function openWordDocPath()
{
var objWord;
objWord = new ActiveXObject("Word.Application");
objWord.Visible = true;
objWord.Documents.Open("\\\\sinhyd800\\SCM\\PeerReview\\SCMWebsiteUserDocumentation\\UserDocumentationForSCMReleaseWebsiteRev-3.doc");
}
</script>
</head>
<body>
<form onSubmit="openWordDocPath()">
<input type="submit" value="submit">
</form>
</body>
</html>

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

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

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: open Word Document from JavaScript