Hi =?Utf-8?B?VGFtaXI=?=,
Im not sure i understand how to do that can you (pleas) be more specific?
Open a Word document. Start the macro recorder (Tools/Macro/Record macro).
Enter a name and click the "keyboard shortcut" button. In the "Press
key..." box enter a keyboard shortcut (Alt+N) for example. Record the
macro.
When you're finished, you should be able to replay the macro at any time by
pressing the keyboard shortcut you specified.
You can't use this dialog box to assign VBA procedures to all possible key
combinations, but it demonstrates the principle. In the Word object model
the KeyBindings collection is responsible for this functionality and it
*can* make assignments to everything except key combinations that belong to
Windows.
The key points are:
1. This can only be done with "macros" (public sub procedures) stored in a
Word VBA module.
2. You need to use KeyBindings.Add to make the assignments. This should be
a one-off proposition, as the assignments will be stored in a Word file.
3. You MUST specify the CustomizationContext for the application when
making the assignments. (Most likely in a template that will be used to
generate the type of document you're doing this for so that the user can
otherwise work normally with Word.)
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail