HOWTO: Change the default behaviour of the commands in my COM dll

G

Guest

i want to change the default behaviour of the word commandbars. i can
call a macro within the document by using the following line

obWDApp.CommandBars("Edit").Controls("Cut").OnAction = "MyCut"

the above line calls the macro "MyCut" inside the document. I want to
call the function MySubCut instead which is defined in the COM dll itself.

Public Sub MySubCut
MsgBox "MySubCut"
End Sub
 
G

Guest

Okay I figured out how to take care of the problem. Next problem is to
how to capture the shortcut key strokes.
 
T

Tobias

Try creating the commandbutton object with a "&" or
ampersand character in front of the letter of DisplayName
for the command button that you want to use..
ie. for the button Name --> "File" use "&File" if you want
the shortcut to be ALT + F
 
G

Guest

it has nothing to do with the commandbutton. instead i will have to change
the keybindings
 

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