Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2003
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tooltips on Word toolbars (WordXP)

    How do you set a tooltip on a button of a Word toolbar? I can't see this as one of the properties. It defaults to the name of the macro behind the button.

    Thanks.

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Tooltips on Word toolbars (WordXP)

    I could have sworn that in previous versions of Word this was done by choosing Tools > Customize and then right click the button and modify the name property. Note: Some words were off limits and got hidden even though they were in the name eg Table.

    Now in Word XP it appears that this is now only accessible by using code (Although my old templates have brought through the old tool-tips and assigned different names to the buttons)

    The following code changes a tooltip and you should be able to work out how to modify it to do what you require.
    <pre>Sub temp1()
    Dim myToolBar As CommandBar, myCtrl As CommandBarControl
    CustomizationContext = ActiveDocument.AttachedTemplate
    Set myToolBar = CommandBars("ChrysRept General")
    'Set myCtrl = myToolBar.Controls(1)
    Set myCtrl = myToolBar.Controls("Normal Style")
    Debug.Print myCtrl.TooltipText
    myCtrl.TooltipText = "Apply the 'Normal' style by clicking me"
    Set myCtrl = Nothing
    Set myToolBar = Nothing
    End Sub</pre>

    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    2 Star Lounger
    Join Date
    May 2003
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tooltips on Word toolbars (WordXP)

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •