Private Sub AppEv_DocumentOpen(ByVal Doc As Document)
MsgBox ("Hi " & Doc.Name)
End Sub
Private Sub AppEv_DocumentChange()
Const Msg1 = "Вы переключились на работу с новым документом!"
Call MsgBox(Msg1 & vbCrLf & ActiveDocument.Name, vbInformation, "Окно информации!")
End Sub
Private Sub AppEv_DocumentBeforeClose(ByVal Doc As Document, Cancel As Boolean)
MsgBox ("Вы закрываете документ " & Doc.Name)
DocQuit
End Sub
|
Листинг 1.68. |
| Закрыть окно |