ThisDocument is the file the code you are running sits in.
If you wanted the keyboard shortcut to work on all documents you could put it in
.CustomizationContext = NormalTemplate
or restrict it to a specific template
.CustomizationContext = ActiveDocument.AttachedTemplate
I recommend you set the keyboard context to the same template that holds the code it is trying to run.
You might also include the module name to ensure there is no confusion in case you have the same macro name in more than one module.
Command:="ModuleName.printAllRecords"
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|