#1
|
|||
|
|||
How do you find what command a toolbar button represents?
How do you find what command a toolbar button represents?
I'd like to import the function of some of the tool bar buttons on the "Reviewing" toolbar into a customized "Reviewing" menu. It turns out that I use some of the buttons on the "Reviewing" tool bar quite frequently, but the rest almost never. So, by importing these frequently used functions into a newly built menu, I will be able to claim more real estate for text editing. But the problem is, I don't know what "command" these toolbar buttons represent. I wish there was a "property" menu when you right-click a toolbar that displays such information. Is there any easy way to find out what command a particular toolbar button executes? |
#2
|
|||
|
|||
You can create a new toolbar and simply copy the buttons you want from the Reviewing toolbar by Ctrl-Dragging them there.
I don't know the answer to your question so started with the macro listed at http://word.mvps.org/FAQs/MacrosVBA/...roToButton.htm and came up with the following which gives the caption (tooltip) and the button ID. Code:
Sub ShowCaptionandID() Dim oToolbar As CommandBar Dim oButton As CommandBarControl On Error Resume Next 'Replace the name if you've used another toolbar Set oToolbar = CommandBars("Formatting") For Each oButton In oToolbar.Controls 'Check if it is a customized button If oButton.BuiltIn Then MsgBox oButton.Caption & " " & oButton.ID & " " ' & oButton.OnAction End If Next Set oButton = Nothing Set oToolbar = Nothing End Sub |
#3
|
|||
|
|||
Quote:
|
#4
|
|||
|
|||
Did you try, with the Customize dialog open, Ctrl-dragging the buttons you want to your toolbar?
The button IDs are useful for trying to programmatically build a toolbar but I don't think that is what you are trying to do. |
#5
|
|||
|
|||
Yes, I'm cognizant of how you can move/copy a button from one toolbar to another. But here I'm trying to replicate a command represented by a toolbar button in a menu. It's just that all of my toolbars are already full (i.e., flush to the right margin of the screen), so I can't copy this particular button to any other toolbar without making them disappear into a drop-down button.
|
#6
|
|||
|
|||
Copy the button to your menu. I made a menu with all the commands from the Reviewing toolbar in 2 minutes. It displays the commands as well as the button images by default. (These are not necessarily the commands that are on the All Commands list, though.)
Last edited by Charles Kenyon; 05-05-2012 at 03:28 AM. |
#7
|
|||
|
|||
Quote:
It never occurred to me that a button on a toolbar and a menu item in the menubar are interchangeable. Thanks! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I enable a button in the quick access toolbar | dpb001 | Word VBA | 1 | 05-02-2012 12:41 AM |
Email button on quick access toolbar | castman | Word | 3 | 01-17-2012 02:24 PM |
Check Boxes and Command Buttons | Micky P | Word VBA | 0 | 10-27-2011 01:06 AM |
Command Button | cksm4 | Word VBA | 7 | 02-27-2011 08:47 PM |
Run Outside application from toolbar button | Richard Harison | Word | 3 | 12-20-2005 03:22 PM |