Having an awful time turning off a one-key shortcut via VBA.
The first line of code I'm using is:
as the shortcut is bound to a document, not to Normal or an add-in.
The helpfiles on keybindings are very spotty, even for Microsoft, but I deduced that one of the lines below should work for the next step:
But they don't. I've even tried KeyBindings.ClearAll (thinking I could programmatically rebuild the others, since there's only 2) but that doesn't work either!
Any ideas? Using the Customize Keyboard dialog isn't an option, for various reasons. This needs to happen in code.
Thanks for any clues.
Mark
The first line of code I'm using is:
Code:
CustomizationContext = ActiveDocument
as the shortcut is bound to a document, not to Normal or an add-in.
The helpfiles on keybindings are very spotty, even for Microsoft, but I deduced that one of the lines below should work for the next step:
Code:
KeyBindings(BuildKeyCode(wdKeyF2)).Clear
FindKey(BuildKeyCode(wdKeyF2)).Clear
KeyBindings(wdKeyF2).Clear
FindKey(wdKeyF2).Clear
But they don't. I've even tried KeyBindings.ClearAll (thinking I could programmatically rebuild the others, since there's only 2) but that doesn't work either!
Any ideas? Using the Customize Keyboard dialog isn't an option, for various reasons. This needs to happen in code.
Thanks for any clues.
Mark