June 2006 Newsletter Tools, Tips and Websites
Creating ToolTips for Macro Buttons on Word Toolbars
by Kate Stevens
Have you ever created a custom toolbar in Word? If so, you may have noticed that you can easily change the ToolTips for buttons that apply styles, but the same does not apply for buttons that run macros. This article explains how you can create your own ToolTips for macro buttons.

Creating a custom toolbar is a great way to help Word users apply the styles in your template. You can create a button for each of your styles so that your users can immediately see which styles they should be using. You can also let users see keyboard shortcuts in ToolTips as shown in the screenshot below:

Toolbar showing tooltip

You can easily change ToolTips for buttons that link to styles. To do this, right-click the toolbar, select Customize from the shortcut menu and right-click the button. On the shortcut menu that appears, enter the text you want to show in the ToolTip in the Name box. The text that you enter in this box appears as a ToolTip when the user moves their pointer over the button on the toolbar. You can append the keyboard shortcut to the name of the style so that users can easily view and learn shortcuts.

The above does not hold true for buttons that link to macros. Instead the ToolTip shows the name of the macro. This means that if you’ve created a macro that applies a style, and inserts and formats some text, you can’t simply change the name of the ToolTip to show users any keyboard shortcut you have created. Luckily, you can easily get around this by using another macro.

The macro, available from the Microsoft support website (support.microsoft.com), is shown below:

Sub ChangeToolTip()
      With CommandBars("Standard") ' The name of your toolbar
            With .Controls("My Custom Button") ' The name of the button
                .TooltipText = "My Custom Tip" ' The ToolTip text
            End With
      End With

End Sub

To use this macro, paste it into the Visual Basic Editor and replace the values in the quotation marks as follows:
Standard – replace with the name of your toolbar
My Custom Button – replace with the name of the macro button as specified in the Name box on the button's shortcut menu (available through the Customize command)
My Custom Tip – replace with the text that you want to show in the tooltip

Run the macro to change the text of the ToolTip for the macro button. You only have to do this once for each of your macro buttons and the result is a professional toolbar that helps your users by letting them quickly view your keyboard shortcuts.