Microsoft KB Archive/926708

= A keyboard shortcut that is assigned to a macro is missing from the &quot;Customize Keyboard&quot; dialog box after you restart Word 2007 =

Article ID: 926708

Article Last Modified on 10/15/2007

-

APPLIES TO


 * Microsoft Office Word 2007

-



SYMPTOMS
You assign a keyboard shortcut to a macro in Microsoft Office Word 2007. When you restart Word 2007, 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:  Start Word 2007. Press ALT+F11 to start the Microsoft Visual Basic Editor. On the Insert menu, click Module.  Type or paste the following macro in the code sheet.

Note Replace &quot;mytest&quot; 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:=&quot;mytest&quot;) myStr = myStr & myKey.KeyString & vbCr Next myKey MsgBox myStr End Sub  On the File menu, click Save Normal. On the File menu, click Close and Return to Microsoft Word.

<div class="moreinformation_section">

MORE INFORMATION
To assign a keyboard shortcut to a macro, follow these steps:  Start Word 2007.</li> Click the Microsoft Office Button, and then click Word Options.</li> Click Customize.</li> Next to Keyboard shortcuts, click Customize.</li> In the Customize Keyboard dialog box, follow these steps:  In the Categories box, click Macros.</li> In the Macros box, click your macro.</li> In the Press new shortcut key box, press the shortcut keys that you want to assign to the macro. For example, press CTRL+0 .</li> Click Apply.</li> Click Close to close the Customize Keyboard dialog box.</li></ol> </li> Click OK to close the Word Options dialog box.</li></ol>

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.

Additional query words: word2007 word2k7 word12 wd2007 wd2k7 wd12

Keywords: kbtshoot kbkeyaccel kbprb kbexpertiseinter KB926708

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.