Assing shortcut to macro using VBA

B

Bo Rasmussen

Hi,

How do I setup a shortcut to a macro uisng VBA using Office '97.

Regards
Bo Rasmussen
 
B

Bo Rasmussen

Hi Anne,

FYI I found this in the help for the Rebind command

This sets the shortcut Ctrl-Shift-5 to the macro documentSetup located in
the module1 module.

CustomizationContext = ActiveDocument
Set myKey = FindKey(BuildKeyCode(wdKeyControl, wdKeyShift, wdKey5))
myKey.Rebind KeyCategory:=wdKeyCategoryCommand,
Command:="module1.documentSetup"

Regards
Bo
 

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