Link to home
Start Free TrialLog in
Avatar of hsrstud
hsrstud

asked on

Changing right-click mini toolbar

I'm wondering if there is a way to change the mini toolbar in Word 2007 that pops up just above the context menu using VBA.  For instance, as I posted in a related question, I use the following code to create an underline button within the right-click context menu.  It would be even better if I could place this button in the mini toolbar.

Sub Addunderline()
    Dim cb As CommandBar
    Dim c As CommandBarButton
    Set cb = Application.CommandBars("Text")
    Set c = cb.FindControl(, , "VBAxUnderline")
    If c Is Nothing Then
        Set c = cb.Controls.Add(msoControlButton, 115, , 5, True)
        With c
            .Caption = "&Underline"
            .Style = msoButtonIconAndCaption
            .TooltipText = "Underline"
            .Tag = "VBAxUnderline"
        End With
    End If
End Sub
ASKER CERTIFIED SOLUTION
Avatar of hsrstud
hsrstud

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial