js 通过 WORD.APPLICATION,获取关闭后事件,高分求教
如题,VBA写法如下
Public WithEvents appWord as Word.Application
/Private Sub appWord_DocumentBeforeClose _
(ByVal Doc As Document, _
Cancel As Boolean)
Dim intResponse As Integer
intResponse = MsgBox("Do you really " _
& "want to close the document?", _
vbYesNo)
If intResponse = vbNo Then Cancel = True
End Sub
转为JS 应该如何写?