Maybe you can use the following macro as a starting point (but I am not sure
whether it gathers the type of information you want). The macro iterates
through all commands in the Menu Bar. For each command in each menu, it
checks whether the command is built-in. If it is not, information about the
command is inserted at the end of the active document. You could gather more
information about each command if needed.
Sub FindCustomCommands()
Dim oControl_1 As CommandBarControl
Dim oControl_2 As CommandBarControl
Dim oDoc As Document
Dim strInfo As String
Dim n As Long
Set oDoc = ActiveDocument
n = 0 'use as counter
For Each oControl_1 In CommandBars("Menu Bar").Controls
For Each oControl_2 In oControl_1.Controls
If oControl_2.BuiltIn = False Then
'Gather info about the control:
'- Caption of the menu without the & character
'- Caption of the command itself
'- The name of the macro that is executed by the command
strInfo = "Menu :" & Replace(oControl_1.Caption, "&", "") &
vbCr & _
"Caption: " & oControl_2.Caption & vbCr & _
"Macro: " & oControl_2.OnAction
n = n + 1
'Insert the information at the end of oDoc
oDoc.Range.InsertAfter vbCr & vbCr & strInfo
End If
Next oControl_2
Next oControl_1
MsgBox "Finished." & vbCr & n & " custom commands found."
Set oDoc = Nothing
End Sub
--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word