A keyboard shortcut that is assigned to a macro is missing from the "Customize Keyboard" dialog box after you restart Word 2007 or Word 2010

Symptoms

You assign a keyboard shortcut to a macro in Microsoft Office Word 2007 or Microsoft Word 2010. When you restart Word 2007 or Word 2010, the keyboard shortcut for the macro is missing from the Customize Keyboard dialog box.

Note When you use the keyboard shortcut, the macro runs as expected.

Workaround

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

To work around this issue and to determine whether a keyboard shortcut is assigned to a macro, follow these steps:
  1. Start Word 2007 or Word 2010.
  2. Press ALT+F11 to start the Microsoft Visual Basic Editor.
  3. On the Insert menu, click Module.
  4. Type or paste the following macro in the code sheet.

    Note Replace "mytest" in the macro with the name of the macro for which you want to find the assigned keyboard shortcut.
    Sub MacroKeys()
    CustomizationContext = NormalTemplate
    For Each myKey In KeysBoundTo(KeyCategory:=wdKeyCategoryMacro, Command:="mytest")
    myStr = myStr & myKey.KeyString & vbCr
    Next myKey
    MsgBox myStr
    End Sub
  5. On the File menu, click Save Normal.
  6. On the File menu, click Close and Return to Microsoft Word.

More Information

To assign a keyboard shortcut to a macro, follow these steps:
  1. Start Word 2007.
  2. Click the Microsoft Office Button, and then click Word Options.
  3. Click Customize.
  4. Next to Keyboard shortcuts, click Customize.
  5. In the Customize Keyboard dialog box, follow these steps:
    1. In the Categories box, click Macros.
    2. In the Macros box, click your macro.
    3. In the Press new shortcut key box, press the shortcut keys that you want to assign to the macro. For example, press CTRL+0.
    4. Click Apply.
    5. Click Close to close the Customize Keyboard dialog box.
  6. Click OK to close the Word Options dialog box.
  1. Start Word 2010.
  2. Click the File Tab, and then click Options.
  3. Click Customize Ribbon.
  4. Next to Keyboard Shortcuts, click Customize.
  5. In the Customize Keyboard dialog box, follow these steps:
    1. In the Categories box, clock Macros.
    2. In the Macros box, click your macro.
    3. In the Press new shortcut key box, press the shortcut keys that you want to assign to the macro. for example, press CTRL+0.
    4. Click Apply.
    5. Click Close to close the Customize Keyboard dialog box.
6. Click OK to close the Word Options dialog box.


For more information about how to assign a keyboard shortcut to a macro, click Microsoft Office Word Help, type assign a keyboard shortcut to a macro in the Search box, and then click Search.
Properties

Article ID: 926708 - Last Review: Jan 12, 2012 - Revision: 1

Feedback