KeyCode Property Example

This example displays a message if the KeyBindings collection includes the ALT+CTRL+W key combination.

CustomizationContext = NormalTemplate
aCode = BuildKeyCode(wdKeyAlt, wdKeyControl, wdKeyW)
For Each aKey In KeyBindings
    If aCode = aKey.KeyCode Then 
        MsgBox aKey.KeyString & " is already in use"
    End If
Next aKey