Events and ActiveXObject('Word.Application')



Marc Delamere
07-09-2005, 10:03 PM
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


Events and ActiveXObject('Word.Application')