Example: [REQ68 Functional Requirements] - This is a book mark in our
word document.
A menu item is to be added to the popup menu, only when the right
click is performed on a book mark. So we need to capture the right
click event to check if the cursor is placed on a bookmark.
We are calling the function that adds the menu item to the right click
popup menu in the class module,
Private Sub App_WindowBeforeRightClick(ByVal sel As Selection, Cancel
As Boolean)
Call macro1.function1(sel)
End Sub
But the application event in the class module is not trigerred
anywhere(we have placed even a break point in the function call).
Why is it not trigerred?
Where to call this application event.(App_WindowBeforeRightClick)
Helmut Weber - 19 Jan 2005 13:06 GMT
Hi Petricia,
have you followed the instructions there:
http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm
After changing code, however, a macro like
Public Sub StartMe()
Set oAppClass.oApp = Word.Application
End Sub
has to be executed again.
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000