Hi,
ich habe ein Problem mit Application.DocumentBeforeClose Event. Das leider nicht ausgelöst unter Word 2016 unter Macos. Das Event Application.DocumentBeforeSave funktioniert aber.
Unter Windows 10 mit Word 2016 gehen beide Events...
Hat jemand ne Idee?
Vielen Dank :)
Module1:
Option Explicit
Dim appWord As New AppClass
Sub Register_Event_Handler()
Set appWord.oApp = Word.Application
End Sub
Sub AutoOpen()
MsgBox ("auto open")
Register_Event_Handler
End Sub
AppClass:
Option Explicit
Public WithEvents oApp As Word.Application
Private Sub oApp_DocumentBeforeClose(ByVal doc As Document, Cancel As Boolean)
MsgBox("document before close event")
End Sub
Private Sub oApp_DocumentBeforeSave(ByVal doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
MsgBox("document before save event")
End Sub
|