Keycode constants for a vertical bar or reverse slash
Posted on 2009-12-23
A search for "keyboard constants" in MS Word help or a Google search brings up a table of Keycode constants. Neither location shows a keycode for the "\" (reverse slash) or the "|" (vertical bar, which is a shift + the reverse slash).
I am using the following command in VBA to program a shortcut to run a subroutine:
KeyBindings.Add KeyCategory:=wdKeyCategoryMacro, _
KeyCode:=BuildKeyCode(wdKeyShift, wdKeyAlt, wdKeyM)
That programs a Shift+Alt+M to run the "MontTableToAutoCorrect" subroutine. I would like to change it to a Shift+Alt+|, which would mean I should change wdKeyM. I just cannot see what the keyboard constant would be for a vertical bar.