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
 
Back
Top