Option Explicit
Sub AddKeyBinding()
With Application
.CustomizationContext = ThisDocument
.KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, wdKey0), _
KeyCategory:=wdKeyCategoryCommand, _
Command:="TestKeybinding"
End With
End Sub
Option Explicit
Sub TestKeybinding()
MsgBox "We have a winner", vbInformation, "Succes"
End Sub
|