Sub indexMenu()
Dim b As CommandBarControl
Dim c As Object
For Each b In Application.CommandBars("Menu bar").Controls
Debug.Print b.ID & " " & b.Index & " " & b.Caption
If b.Type = msoControlPopup Then
For Each c In b.Controls
Debug.Print c.ID & " " & c.Index & " " & c.Caption
Next c
End If
Next b
End Sub
Sub IndezMenu2()
On Error Resume Next
For Each b In Application.CommandBars("Menu bar").Controls
Debug.Print "==================================================================="
Debug.Print b.ID & " " & b.Index & " " & b.Caption
For Each c In b.Controls
Debug.Print "------------------------------------------------"
Debug.Print c.ID & " " & c.Index & " " & c.Caption
If c.ID = 30233 Then Stop
For Each d In c.Controls
Debug.Print d.ID & " " & d.Index & " " & d.Caption
Next d
Next c
Next b
'''Обращение к панели инструментов через индексы'
''CommandBars(2071).Controls(2). _
''Controls(7).Controls(2). _
''accDoDefaultAction
End Sub