B
Benjamino5
My template has a commandbar with buttons and pop-ups (menus). I've been
adding keybindings for the buttons by simply having the shortcut key call the
same macro the button calls.
Now, I'd like to add a keybinding that will open a pop-up (menu) on the
commandbar, just like pressing Alt-F opens the File menu in Word.
The desired behavior would be pressing Alt-something and having a pop-up on
my commandbar open, so that the user could use the arrow keys to go up and
down the menu. Pressing Enter would then select a command--all exactly like
the regular menus in Word.
Here's what I've been doing to assign keys to macros so far:
____________________
' first I set the CustomizationContext to my template, etc. then I do this:
With Application.KeyBindings
' "New Solution" is Alt-N
.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyN), _
KeyCategory:=wdKeyCategoryMacro, Command:="Nl1"
' etc.
_______________________
It seems like I could somehow put the pop-up into the Command argument--or
do I need to change the KeyCategory to wdKeyCategoryCommand as well?
Is this even possible?
Thanks in advance!
Ben
adding keybindings for the buttons by simply having the shortcut key call the
same macro the button calls.
Now, I'd like to add a keybinding that will open a pop-up (menu) on the
commandbar, just like pressing Alt-F opens the File menu in Word.
The desired behavior would be pressing Alt-something and having a pop-up on
my commandbar open, so that the user could use the arrow keys to go up and
down the menu. Pressing Enter would then select a command--all exactly like
the regular menus in Word.
Here's what I've been doing to assign keys to macros so far:
____________________
' first I set the CustomizationContext to my template, etc. then I do this:
With Application.KeyBindings
' "New Solution" is Alt-N
.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyN), _
KeyCategory:=wdKeyCategoryMacro, Command:="Nl1"
' etc.
_______________________
It seems like I could somehow put the pop-up into the Command argument--or
do I need to change the KeyCategory to wdKeyCategoryCommand as well?
Is this even possible?
Thanks in advance!
Ben