Using events with the Application object (Word) | Microsoft Learn
I have followed the steps declare object variable
Public WithEvents App As Word.Application
I have written an event:
Private Sub App_DocumentChange()
MsgBox "application change document app ran "
End Sub
I have written the declared object
Dim X As New EventClassModule
Sub Register_Event_Handler()
Set X.App = Word.Application
End Sub
I do not understand how to Run the Register_Event_Handler procedure above.
nothing seems to work