You can achieve the required Table of Contents result, as I said, via the Use of heading Styles. All you need to do is prefix each macro with an appropriate descriptor in the Heading 1 Style. For example, to use the macro name as the descriptor:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "Sub [!\(^l^13]@\(\)"
.Replacement.Text = ""
.Forward = True
.Format = False
.Wrap = wdFindStop
.MatchWildcards = True
End With
Do While .Find.Execute
.Text = Split(Split(.Text, " ")(1), "()")(0) & " Macro" & vbCr & .Text
.Paragraphs.First.Style = wdStyleHeading1
.Collapse wdCollapseEnd
Loop
End With
Application.ScreenUpdating = True
End Sub