Sub OutputControlsID() ' ==================================== ' Extract the Caption and ID of all ' controls contained on all toolbars ' (including the menu). ' ' This procedure is included to help ' maintenance of the other macros; ' it is not used in the Tax Rep. ' Narrative process. ' ==================================== Close #1 Open "c:\temp\toolbars.txt" For Output As #1 For Each loToolBar In CommandBars Write #1, 0, loToolBar.Name, 1 For Each loControl In loToolBar.Controls Write #1, loControl.ID, loControl.Caption, 2, loControl.Type If loControl.Type = msoControlPopup Then For Each loCtrl3 In loControl.Controls Write #1, loCtrl3.ID, loCtrl3.Caption, 3, loCtrl3.Type If loCtrl3.Type = msoControlPopup Then For Each loCtrl4 In loCtrl3.Controls Write #1, loCtrl4.ID, loCtrl4.Caption, 4, loCtrl4.Type Next End If Next End If Next Next Close #1 End Sub