Events and ActiveXObject('Word.Application')

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
How do I catch the DocumentBeforeSave event when I close a word doc created
with ActiveXObject('Word.Application') in JavaScript? IE6.

Is the right direction to use:

1)
wscript.ConnectObject(wdApp, "wdApp_");
function wdApp_DocumentBeforeSave(doc, SaveAsUI, Cancel)
{
alert("event wdApp_DocumentBeforeSave");
}
but I understand wscript can't be used inIE

2)
<script FOR="wdApp" EVENT="DocumentBeforeSave()">
alert("DocumentBeforeSave");
</script>
but on the Application or the Document.

Neither seem to work :(
Thanks for any help,
Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top