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 / Programming / July 2005

Tip: Looking for answers? Try searching our database.

Shortcut to a button on a toolbar

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ulf Nilsson - 13 Jul 2005 07:13 GMT
Hi,
How do I assign a shortcut to a button on a toolbar when the macro assigned
to the button is not to (and should not) be found under Tools - Customise...
- Keyboard... - Macros?

/ Ulf
Ulf Nilsson - 13 Jul 2005 07:22 GMT
I forgot to tell that the button is also in a menu. So it does not matter if
the shortcut is assigned to the button on the toolbar or in the menu.

/ Ulf

> Hi,
> How do I assign a shortcut to a button on a toolbar when the macro assigned
> to the button is not to (and should not) be found under Tools - Customise...
> - Keyboard... - Macros?
>
> / Ulf
Anne P. - 13 Jul 2005 14:07 GMT
Choose Tools, Customize.  Right-click the button or menu item to have a
shortcut assigned.  Edit the name field and place an ampersand (&) to the
left of the letter that you want to be a shortcut.  For example, you have a
button whose caption is Symbol.  Place the amperand to the left of the S.
After you close out of Tools, Customize the S in Symbol will be underlined.
The user can then press Alt+S to access the button or menu item.

Anne P.
>I forgot to tell that the button is also in a menu. So it does not matter
>if
[quoted text clipped - 10 lines]
>>
>> / Ulf
Ulf Nilsson - 14 Jul 2005 07:04 GMT
Thanks for your suggestion, but it only works when I choose to show text, and
not when only icons are shown, and I want the icon to be shown and not the
text.

Another problem is that the shortcut, for example Alt + J, can't be assigned
in that way because there is no letter J in the name.

I have to choose letters that Word is not using, and that limits the options.

Any more suggestion?

/ Ulf

> Choose Tools, Customize.  Right-click the button or menu item to have a
> shortcut assigned.  Edit the name field and place an ampersand (&) to the
[quoted text clipped - 18 lines]
> >>
> >> / Ulf
Jean-Guy Marcil - 14 Jul 2005 14:34 GMT
Ulf Nilsson was telling us:
Ulf Nilsson nous racontait que :

> Hi,
> How do I assign a shortcut to a button on a toolbar when the macro
> assigned to the button is not to (and should not) be found under
> Tools - Customise... - Keyboard... - Macros?

Have you looked into keybindings?
Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Ulf Nilsson - 15 Jul 2005 06:42 GMT
How do I use keybindings when the macro is not to be found under Tools -
Customise... - Keyboard... - Macros?

/ Ulf

> Ulf Nilsson was telling us:
> Ulf Nilsson nous racontait que :
[quoted text clipped - 5 lines]
>
> Have you looked into keybindings?
Jean-Guy Marcil - 15 Jul 2005 14:44 GMT
Ulf Nilsson was telling us:
Ulf Nilsson nous racontait que :

> How do I use keybindings when the macro is not to be found under
> Tools - Customise... - Keyboard... - Macros?

Try something like this:

CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyAlt, _
   wdKeyZ), KeyCategory:=wdKeyCategoryMacro, _
   Command:="TestModule.Main"

This will assign the the ALT-Z shortcut to the Main macro in the TestModule.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Ulf Nilsson - 18 Jul 2005 14:11 GMT
Since I work with Office XP Dev and create dll, I cannot use any template to
attach any macro. Because of this, I do not think I can use KeyBindings.
Please correct me if I'm wrong.

I was thinking of another solution: If I press the following keys, I can
access my item: Alt + e, n, i

Is it possible to create such a macro in Normal.dot, that is NormalTemplate,
using my macro and call it MyMacro? Then I can use keyBindings?

Or can I set Alt + e, n, i instead of "TestModule.Main"?

/ Ulf

> Ulf Nilsson was telling us:
> Ulf Nilsson nous racontait que :
[quoted text clipped - 10 lines]
>
> This will assign the the ALT-Z shortcut to the Main macro in the TestModule.
 
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.