Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Menus and Toolbars / January 2004

Tip: Looking for answers? Try searching our database.

How to show keyboard shortcut on menu?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mary Kerrigan - 05 Jan 2004 16:32 GMT
I have a custom menu item on a toolbar, assigned to a macro that also
has a keyboard shortcut assigned.  How do I get that keyboard shortcut
to show on the menu (other than typing it there)?
Candice Mesk - 05 Jan 2004 17:27 GMT
You're gonna have to type it there, I'm afraid...

> I have a custom menu item on a toolbar, assigned to a macro that also
> has a keyboard shortcut assigned.  How do I get that keyboard shortcut
> to show on the menu (other than typing it there)?
Klaus Linke - 08 Jan 2004 01:09 GMT
> > I have a custom menu item on a toolbar, assigned to a macro that
> > also has a keyboard shortcut assigned.  How do I get that keyboard
> > shortcut to show on the menu (other than typing it there)?

> You're gonna have to type it there, I'm afraid...

... and to type it there (right-aligned, same as the other shortcuts),
you'll need VBA, I'm afraid:

Assuming your macro is on the "Tools" menu and the menu item displays the
caption "MyMacro" and has the shortcut "F2,M":

 Dim myCBC As CommandBarControl
 Dim myCBB As CommandBarButton
 Set myCBC = _
 CommandBars("Menu Bar").Controls("Tools").Controls("MyMacro")
 If Not (myCBC Is Nothing) Then
   Set myCBB = myCBC
   myCBB.ShortcutText = "F2,M"
   MsgBox myCBB.ShortcutText, , "Assigned:"
 End If

If you got the caption or something else wrong, you'll get some error
message.

Regards,
Klaus
Suzanne S. Barnhill - 05 Jan 2004 22:44 GMT
Is this a menu item or a toolbar button? Menus show keyboard shortcuts by
default. ScreenTips for toolbar buttons will show the shortcut provided you
have that option enabled (Tools | Customize | Options).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


> I have a custom menu item on a toolbar, assigned to a macro that also
> has a keyboard shortcut assigned.  How do I get that keyboard shortcut
> to show on the menu (other than typing it there)?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.