Custom CommandBar

Joined
Jan 15, 2008
Messages
1
Reaction score
0
I'm building a custom right click using VBA for Word. I am not able to make the TooltipText appear. Is there anything I am missing in the code below?:

Set myCommandBar= CommandBars.Add("name1",_ msoBarPopup, False, True)

If myCommandBar.FindControl(, , "tag1", True) Is Nothing Then

Set CommandBarPopup1= myCommandBar.Controls.Add_(msoControlPopup, , , 5, Temporary:=True)
With CommandBarPopup1
.BeginGroup = True
.Caption = "Caption text"
.Tag = "tag1"
End With

Set button1=CommandBarPopup.Controls.Add_(msoControlButton, , , , False)
With button1
.Caption = "Click here"
.BeginGroup = True
.TooltipText = "Tool tip text"
.FaceId = 126
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top