Assigning a Macro to a Shortcut Key

by Allen Wyatt
(last updated August 4, 2018)


Word allows you to assign macros or commands to specific key combinations. These key combinations are referred to as shortcut keys, and when used they result in the macro or command being executed. When you first create a macro by recording it, Word gives you the opportunity to assign the macro to a specific key combination. If you later want to change the key combination, you can follow these steps:

  1. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 or a later version, display the File tab of the ribbon and then click Options.)
  2. At the left side of the dialog box, click Customize (Word 2007) or Customize Ribbon (Word 2010 or later).
  3. Near the bottom of the dialog box, click the Customize button. Word displays the Customize Keyboard dialog box. (See Figure 1.)
  4. Figure 1. The Customize Keyboard dialog box.

  5. Scroll through the Categories list and select the Macros category. The list at the right side of the dialog box changes to show the currently available macros.
  6. In the Macros list, select the macro you want assigned to the shortcut key.
  7. With the insertion point in the Press New Shortcut Key box, press the shortcut key you want to use. For instance, if you want to use Ctrl+Alt+J, press that.
  8. Just below the Current Keys box you can see whether the shortcut key is already assigned to a different function.
  9. Click on Assign.
  10. Repeat steps 5 through 8 for each change you want to make.
  11. Click on Close.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (8058) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Office 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Auto Creation of an Acronym List

If you use a lot of acronyms in your documents, you may want a quick way to compile those acronyms and their definitions ...

Discover More

Preventing Printing

Want to prevent your worksheet from being printed? You may be out of luck, as a determined person may be able to find a ...

Discover More

AutoFilling from a Custom List

AutoFill can be a real timesaver if you often work with set lists of data. You can define your own custom lists and then ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Determining the Length of a String

Need to find out in a macro how long a particular text string is? You can figure it out by using the Len function, ...

Discover More

Controlling the Bold Text Attribute

When processing a document in a macro, you may need to make some of your text bold. It's easy to do using the Bold ...

Discover More

Displaying a Message in the Status Bar

A great place for your macro to display status information is, well, in the status bar. Displaying the information is ...

Discover More

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two less than 5?

2018-09-12 22:00:09


I want to create a macro using Alt + R - even though it appeared unassigned when i created the macro Alt + R apparently is the keystroke for the Review tab in Word 2013. Can i still use it ?

2018-04-11 15:31:29

Sara Monahan

Thank you for creating this post!

2017-05-12 09:37:26


We have shortcut keys on word templates (developed in 2003). I have one template where the shortcut key will not work, how do I restore it???

2017-03-30 02:50:48

Alan Elston

I originally found the Ctrl and Ctrl + Shift quite restrictive, until I realised that you actually have an infinite amount of possibilities..
_1st ) Ctrl + Shift + Alt + letter/Fkey
Ctrl + Shift + Alt + letter
Ctrl + Shift + Alt + Fkey

_2nd ) Number Sequences. This I find particularly useful for similar macros..
Ctrl + Shift + B ( take fingers away , then ) a number

Remember that you do not type anything in the dialogue box.. you use the actual short cut key you want to use and it then appears and it appears then in the “Press new shortcut Key:” bar
It is worth experimenting with the many key combinations available

2017-03-29 16:14:53


Many thanks!

2016-11-17 09:15:22

Alan Elston

Thanks for this very clear Blog

I think a small Typo at 7. – it should read “..Just to the left of....”

It might be worth emphasising at 6. That you must use the actual Key Ctrl and a letter or the Keys Ctrl and Alt and a letter. You cannot type in a string such as “Ctrl+Alt+B”. You also cannot paste in a string of a valid combination.


2016-08-26 22:56:04


@Steve: You can use the VBA object document.tables(1).cell(1,2) to reference the range content of cell row 1 column 2. As an example referred to your macro:
replacement text:

Maybe a better way would be to use autotext for the acronyms rather than a table? Then whenever someone types an acronym it will automatically be translated to the correct text.

2016-08-26 03:43:20

shivaraj dalawai

Thank you so much for your working solution.

2016-08-23 12:37:46

steve whittle

I have an acronym list that I find useful in many docs that I write. It is simply two columns wide containing the acronym in the first column and its meaning in the second column. Also, each acronym is hyperlinked to its own bookmark and I have leveraged the hyperlink screen tip.

The reason for this is so I can run a (hard coded) macro to globally scan and replace plain text words matching the hyperlinked acronyms above. The essence of this macro is below as an example - where AAA is the first acronym, BBB the second and so on all the way down to ZZZ (there are approx. 80 acronyms in the table).

My 2 questions are:

1) What code do I need to simply use the cell content found in the first cell, propagate that then move down to the second, propagate that etc. so that I am not using hard coded values?
2) What code do I need to efficiently loop through each acronym _ vs. replicating the code over and over again as per below.

Many thanks for any help you can provide.

Sub Replace_text_with_links
'Ensure cursor is positioned properly at top of table, first column to the immediate right of first word
Selection.GoTo What:=wdGoToBookmark, Name:="Start"
'Ensuring user wants to proceed
If MsgBox("To start this brief global word 'mouse over' replacement routine, press 'Yes' to start. Otherwise,
press 'No' to exit.", vbYesNo) <> vbYes Then
Exit Sub
End If
Selection.MoveLeft Unit:=wdWord, Count:=l, Extend:=wdExtend
With Selection. Find
.Text = "AAA"
.Replacement.Text = "Ic"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAIiWordForms = False
End With

Selection.Find.Execute Replace:=wdReplaceAIi
Selection.MoveDown Unit:=wdLine, Count:=l
Selection.MoveLeft Unit:=wdWord, Count:=l, Extend:=wdExtend
Selection. Find. Replacement.Clea rFormatting
With Selection.Find
.Text = "BBB"
.Replacement.Text = "Ic"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAIIWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAII
Selection.MoveDown Unit:=wdLine, Count:=l
Selection. Move Left Unit:=wdWord, Count:=l, Extend:=wdExtend
Selection. Find .Clea rFormatting
Selection. Find. Replacement.ClearFormatting
With Selection. Find
.Text = "zzz"
.Replacement.Text = "Ic"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAIIWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAIi
End Sub

2016-08-15 14:29:48

bob baxter

how can I assign an F key to insert my email address and another F key to insert my password?

2016-02-08 03:51:02


Thank you very much!! very well explained didn't face difficulty to follow the post.

2015-12-07 12:38:20


Will be receiving a macro to insert a specified logo into my Word and Excel document. Have my ribbons customized, so how do I implement these macros for my word and excel programs. Last time someone deleted my customized ribbon.

2015-10-03 14:54:07


There are a few issues related to this:
1) You need to store the key assignment in the normal.dotm template as said before.
If fact, I think the best practice would be to store the key assignment in the template where the macro resides.

2) If your macros are in the same template (Normal.dotm), they have to be in the NEWMACROS module. There seems to be a bug in Word when assigning keys to macros that are in a different module (within the same template). Word assumes that they are in the Newmacros Module when they are not.
To get an indication of this: Customize keyboard dialog - enter one of the keys you have defined in the "Press new shortcut key" box. If the text shows up below the current keys box that "Currently assigned to ...", the key is correctly assigned.

[I haven't tested this with other templates than Normal.dotm yet].

3) If you get the message at the end that Word cannot save your Normal.Dotm file, you probably have an issue with another instance of Word being open and locking this file. I have seen this with Excel and embedded word documents where Word has been started under the DCOM process. Sometime this process will still linger after Excel has been closed.
My method is: Open Word before you open Excel with that embedded document.

2015-09-20 12:09:19

Stephen McBride

Does not store the macro key. Need to write a new macro using record keystrokes that run my macro to get it to go to a key.

2015-09-02 18:56:27


Excellent!!! I am overwhelmed with Macros and I am always looking for new and easier ways to work with them. Love this, just love it. Thanks for the help and keep it coming.

2014-08-01 19:21:38


You need to select "globaltemplate" instead of "this document" when saving the macro

2013-12-07 05:11:54


I follow all of the steps for creating a macro as above but Word does not save it. I have to create the macro every day. Any ideas?


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.