George said:
I have word XP and wants to be able to find the name of the
macro is link to what custom toolbar in my normal.dot .
Is template. Is this possible? How can I get that.
Hi George,
You could get them with a macro below.
It would be nice if you could get the macro directly from the user
interface (Alt+Ctrl+(Num+), then clicking on the button), but that works
only for buttons that run built-in commands, not for macro buttons.
It would also be nice if the customization dialog (Tools > Customize >
Commands) would automatically update and show the information when you
click on a button, but that doesn't work, either.
Again something for (e-mail address removed) ...
Regards,
Klaus
Sub myMacrosOnToolbars()
Dim myCB As CommandBar
Dim myCBC As CommandBarControl
Dim strMsg As String
For Each myCB In CommandBars
For Each myCBC In myCB.Controls
If myCBC.Type = msoControlButton Then
If myCBC.OnAction <> "" Then
strMsg = "Toolbar = "
strMsg = strMsg & myCBC.Parent.NameLocal
strMsg = strMsg & vbCr
strMsg = strMsg & "Index = "
strMsg = strMsg & myCBC.Index
strMsg = strMsg & vbCr
strMsg = strMsg & "Caption = "
strMsg = strMsg & myCBC.Caption
strMsg = strMsg & vbCr
strMsg = strMsg & "Macro = "
strMsg = strMsg & myCBC.OnAction
strMsg = strMsg & vbCr
MsgBox strMsg
End If
End If
Next myCBC
Next myCB
End Sub