Shortcut keys for macros

G

GwenP

I have been trying all day with no success (although I have done this several
times before!) to add the shortcut key of Ctrl P to a macro residing on a
global template which is located in everyones startup directory. We have a
customised print menu and I just want to assign Ctrl P to launch it. I can
run the macro manually all OK - everything works running off the global .dot
..It just will not keep my shortcut key on this template even though I assign
it (over and over!) and then close the template. When I go back in the
shortkey assignment has been lost?! I can't even save it to my normal
template. Any ideas anyone please?

Thanks
Gwen
 
S

Shauna Kelly

Hi Gwen

Keyboard shortcuts can be stored in documents, templates, add-ins (ie your
global template) or normal.dot. Almost certainly there are 'rogue' settings
somewhere that are intefering. Your task is to ferret out the rogues. Try
this:

Step 1 - ensure that normal.dot has the default keyboard shortcut

Close Word. Move your global template out of the Word startup folder or
otherwise do whatever is necessary so that, when you start Word, your global
template will not load when Word starts. Now, re-open Word. At Tools >
Templates and Add-ins, make sure that your add-in is not loaded.

Now, Tools > Customize > Keyboard. In the "Save changes in" box, choose
Normal.dot. In the Categories box, choose File. In the Commands box choose
FilePrint. What does it say in the Current keys box? It should say Ctrl+P
and Ctrl+Shift+F12.

If it does *not* include Ctrl+P, then, click in the "Press New Shortcut key"
box, and do ctrl-p. Click Assign. Click Close, then Close, and then exit
Word.

Step 2 - make sure that your addin does have the right keyboard shortcut
Start Word again, make sure that your addin is *not* loaded, and do File >
Open to open the addin.

Now, Tools > Customize > Keyboard. In the "Save changes in" box, choose your
addin. In the Categories box, choose Macros. In the Commands box choose your
macro. Click in the "Press New Shortcut key" box, do ctrl-p. Click Assign,
exit out of the dialog box and save your addin.

Step 3 - test to see if it all works

Put your global template back in the Word startup folder, or do whatever is
necessary so that it will load when Word starts. Start Word. Does the
keyboard shortcut work now? Good.

If from this moment it goes wrong in the future, it's almost certainly
because ctrl-p has been assigned to something in the template attached to
the open document, or to the open document.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
G

GwenP

Shauna Kelly said:
Hi Gwen

Keyboard shortcuts can be stored in documents, templates, add-ins (ie your
global template) or normal.dot. Almost certainly there are 'rogue' settings
somewhere that are intefering. Your task is to ferret out the rogues. Try
this:

Step 1 - ensure that normal.dot has the default keyboard shortcut

Close Word. Move your global template out of the Word startup folder or
otherwise do whatever is necessary so that, when you start Word, your global
template will not load when Word starts. Now, re-open Word. At Tools >
Templates and Add-ins, make sure that your add-in is not loaded.

Now, Tools > Customize > Keyboard. In the "Save changes in" box, choose
Normal.dot. In the Categories box, choose File. In the Commands box choose
FilePrint. What does it say in the Current keys box? It should say Ctrl+P
and Ctrl+Shift+F12.

If it does *not* include Ctrl+P, then, click in the "Press New Shortcut key"
box, and do ctrl-p. Click Assign. Click Close, then Close, and then exit
Word.

Step 2 - make sure that your addin does have the right keyboard shortcut
Start Word again, make sure that your addin is *not* loaded, and do File >
Open to open the addin.

Now, Tools > Customize > Keyboard. In the "Save changes in" box, choose your
addin. In the Categories box, choose Macros. In the Commands box choose your
macro. Click in the "Press New Shortcut key" box, do ctrl-p. Click Assign,
exit out of the dialog box and save your addin.

Step 3 - test to see if it all works

Put your global template back in the Word startup folder, or do whatever is
necessary so that it will load when Word starts. Start Word. Does the
keyboard shortcut work now? Good.

If from this moment it goes wrong in the future, it's almost certainly
because ctrl-p has been assigned to something in the template attached to
the open document, or to the open document.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top