You can disable the keybinding using the following code
Sub VBA_DisableKey()
'This code will disables Ctrl + O FileOpen command.
' Disable Ctrl + O
FindKey(BuildKeyCode(wdKeyControl, wdKeyO)).Disable
' Rebind Ctrl + O to FileOpen
FindKey(BuildKeyCode(wdKeyControl, wdKeyO)).Rebind wdKeyCategoryCommand, "FileOpen"
End Sub
Use the rebind method to restore the bind.
No comments:
Post a Comment