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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using word from a browser

Status
Not open for further replies.

kroz

Programmer
Jul 2, 2002
2
IE
Hi all,

I was wondering if anyone had any idea how I can do this.

Basically I want to be able to save changes that a user makes to a word document through the browser.

Here's how I think I can do it:
First create a new word document from a webpage.
Then allow the user to change the document.
I figure that I can add an event listener in javascript to listen for when DocumentClose or Quit happen, then I'll get the text from the document object in my webpage and send it back to be added to my database.

I've tried adding the event handler in javascript like so:
<script language=&quot;javascript&quot;>
var objWord = new ActiveXObject(&quot;Word.Application&quot;)
objWord.visible = true
var WordDoc = objWord.Documents.Add()
</script>

<script FOR=&quot;WordDoc&quot; EVENT=&quot;quit()&quot;>
alert(&quot;save now&quot;);
</script>

Unfortunately it doesn't seem to work.

Has anyone tried this before or know how I can go about doing it?

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top