trigger a macro when user right clicks in a cell of a word table

A

Arlan

How can I execute a VBA macro when a user right clicks in a cell of a word
(XP) table
 
J

Jay Freedman

How can I execute a VBA macro when a user right clicks in a cell of a word
(XP) table

Have a look at the article
http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm. Note that one
of the events for which you can write a procedure is
WindowBeforeRightClick. In that procedure, you would have to test
whether Selection.Information(wdWithinTable) is True. If not, then
simply exit from the procedure; otherwise, do whatever processing you
want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top