Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

Working with word macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Petricia Smith - 19 Jan 2005 12:23 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.