Hello
I am using the below code using Keybinding.
Im finding that my code is not assigning the shortcut keys
any ideas?
diana
‘shortcut keys to call Save and SaveAs.
‘When Word opens, the DM Word template DMIntergration.dot Hummingbird
‘code overwrites the shortcut keys assigned to the code in Normal.dot
‘This code reassigns the keys back to the code in Normal.dot
Dim aKey As KeyBinding
CustomizationContext = NormalTemplate
‘from Hummingbird Save & SaveAs remove all the shortcut keys
For Each aKey In _
KeysBoundTo(KeyCategory:=wdKeyCategoryMacro, _
Command:=”Project.Main.HumSave”)
aKey.Disable
Next aKey
For Each aKey In _
KeysBoundTo(KeyCategory:=wdKeyCategoryMacro, _
Command:=”Project.Main.HumSaveAs”)
aKey.Disable
Next aKey
‘reassign the shortcut keys to Corrs code
CustomizationContext = NormalTemplate
‘to File, Save
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyS, wdKeyControl), KeyCategory:= _
wdKeyCategoryMacro, Command:=”CORRSUI.FileSave.Main”
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyF12, wdKeyShift), KeyCategory:= _
wdKeyCategoryMacro, Command:=”CORRSUI.FileSave.Main”
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyF2, wdKeyShift, wdKeyAlt), _
KeyCategory:=wdKeyCategoryMacro, Command:=”CORRSUI.FileSave.Main”
‘to File, SaveAs
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyF12), KeyCategory:= _
wdKeyCategoryMacro, Command:=”CORRSUI.FileSaveAs.Main”