INF Can a button's OnAction invoke a system wide event?

A

ATS

INF Can a button's OnAction invoke a system wide event?

Please help,

I'm trying to add a button to a command bar in Word, Excel, and other
MS-Office products. Is there a way to set the "OnAction" to call some system
wide event, like a Hot Key? Or a mutex? Or something that another program can
then detect?

Example:

objMyCommandBarButton.OnAction = "=SendHotKey(""CTRL-X"")"

etc...
 
J

Jonathan West

ATS said:
INF Can a button's OnAction invoke a system wide event?

Please help,

I'm trying to add a button to a command bar in Word, Excel, and other
MS-Office products. Is there a way to set the "OnAction" to call some
system
wide event, like a Hot Key? Or a mutex? Or something that another program
can
then detect?

Example:

objMyCommandBarButton.OnAction = "=SendHotKey(""CTRL-X"")"

No, the OnAction command can only refer to a macro. That macro can in turn
do anything you can do in VBA.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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