E
emory.smith
hi,
hope this is the right place for my question.
i am creating a template file for msword that is loaded at startup an
contains a procedure that loads a number of keybindings into the norma
template.
Code
-------------------
Private Sub SetupKeyBindings()
CustomizationContext = NormalTemplate
KeyBindings.ClearAll
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, wdKeyA), KeyCategory:=wdKeyCategoryCommand, Command:="StartOfLine"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, wdKeyE), KeyCategory:=wdKeyCategoryCommand, Command:="EndOfLine"
..
-------------------
the problem is that i would like to be able to change and add/remov
the "keybindings.add" statements without having to open up the ".dot
file and edit macros.
im looking for a way to do any of the following (in order o
preference):
- open and parse a separate xml or text file containing entries o
the form <keycode> <keycatagory> <command> and dynamically generat
each "keybindings.add" statement from a line of the input file
- just put all the "keybindings.add" statements in another file an
insert that file inline into the sub procedure (like using #includ
in c)
- edit the macros in a .dot with a regular editor (ie - withou
opening microsoft word)
im sure that these are all quite easy to do if vba is like any othe
language, but im just learning it (mostly from recording and editin
macros) and havent found any good reference yet (anyone recommend an
good ones?)
hope this is the right place for my question.
i am creating a template file for msword that is loaded at startup an
contains a procedure that loads a number of keybindings into the norma
template.
Code
-------------------
Private Sub SetupKeyBindings()
CustomizationContext = NormalTemplate
KeyBindings.ClearAll
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, wdKeyA), KeyCategory:=wdKeyCategoryCommand, Command:="StartOfLine"
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, wdKeyE), KeyCategory:=wdKeyCategoryCommand, Command:="EndOfLine"
..
-------------------
the problem is that i would like to be able to change and add/remov
the "keybindings.add" statements without having to open up the ".dot
file and edit macros.
im looking for a way to do any of the following (in order o
preference):
- open and parse a separate xml or text file containing entries o
the form <keycode> <keycatagory> <command> and dynamically generat
each "keybindings.add" statement from a line of the input file
- just put all the "keybindings.add" statements in another file an
insert that file inline into the sub procedure (like using #includ
in c)
- edit the macros in a .dot with a regular editor (ie - withou
opening microsoft word)
im sure that these are all quite easy to do if vba is like any othe
language, but im just learning it (mostly from recording and editin
macros) and havent found any good reference yet (anyone recommend an
good ones?)