Weird - keybindings keep changing on menus...

R

RJ Lohan

Hi all,


I have a Word addin (in a template) which includes code to add
Keybindings and to modify the action of menu/toolbar items.

The code to add keybindings I have is;
KeyBindings.Add KeyCategory:=wdKeyCategoryMacro, _
Command:="OpenMyFile", _
KeyCode:=BuildKeyCode(wdKeyControl, wdKeyO)

And to modify the function of certain buttons in the File menu;
Set myButton = myFileMenu.FindControl(Type:=msoControlButton,
id:=CommandBars("File").Controls("Open...").id)

myButton.OnAction = "ObjDocumentOpen"



However, in certain environments something strange is happening.
Whenever I start Word, the 'hooks' have not been installed in hte File
menu, and the default keyboard shortcut for those menu items seems to
have changed. (e.g - Ctrl+O is the normal action shown for the Open menu
item, but it changes to Ctrl+F12)

It must be a setting somewhere in Word that tells it to change the
defaults on those buttons if the code takes them over, but I've no idea
what it is.

Any ideas?


Cheers,
Ryan
 

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