techdoc
03-28-2007, 03:40 AM
Hi,
My problem is pretty basic but I'm an absolute VB noob. We've defined a custom toolbar for our own formatting styles, with keyboard shortcuts for several of those most frequently used (see toolbar 'MyStyles' in the attached file). I'd like to have those shortcuts displayed as tooltips (a.k.a. ScreenTips) but some of the default tooltips which Word2003 insists on adding (from the keyboard customization dialog) are wrong, and worse yet, they resist all my efforts at removal. For example, I can't get rid of the default tooltip "(Alt+!)" for the style Heading1 - even though that key combination doesn't even exist (I've defined Alt+Ctrl+1, not Alt+Shift+1). Same thing for Headers 2 and 3.
The following macro lets me add my own tooltip text, but it doesn't remove the ones defined automatically by Word, which are always displayed in parentheses:
Public Sub FixToolTip()
Const sToolTip As String = "TooltipText"
Const sTBName As String = "ToolbarName"
Const iBtnIdx As Integer = 12 'Position in toolbar starting from left/top
CommandBars(sTBName).Controls(iBtnIdx).TooltipText = sToolTip
End Sub
Any ideas?
Thanks a lot!
Paul
My problem is pretty basic but I'm an absolute VB noob. We've defined a custom toolbar for our own formatting styles, with keyboard shortcuts for several of those most frequently used (see toolbar 'MyStyles' in the attached file). I'd like to have those shortcuts displayed as tooltips (a.k.a. ScreenTips) but some of the default tooltips which Word2003 insists on adding (from the keyboard customization dialog) are wrong, and worse yet, they resist all my efforts at removal. For example, I can't get rid of the default tooltip "(Alt+!)" for the style Heading1 - even though that key combination doesn't even exist (I've defined Alt+Ctrl+1, not Alt+Shift+1). Same thing for Headers 2 and 3.
The following macro lets me add my own tooltip text, but it doesn't remove the ones defined automatically by Word, which are always displayed in parentheses:
Public Sub FixToolTip()
Const sToolTip As String = "TooltipText"
Const sTBName As String = "ToolbarName"
Const iBtnIdx As Integer = 12 'Position in toolbar starting from left/top
CommandBars(sTBName).Controls(iBtnIdx).TooltipText = sToolTip
End Sub
Any ideas?
Thanks a lot!
Paul