This macro works for the instances of MyStyle in the footnotes.
Code:
Sub aaa()
Dim aFN As Footnote, aRng As Range, aRngRef As Range, sCode As String
For Each aFN In ActiveDocument.Footnotes
Set aRng = aFN.Range
With aRng.Find
.ClearFormatting
.Text = ""
.Style = "MyStyle"
If .Execute Then
Set aRngRef = aFN.Reference
aRngRef.Collapse wdCollapseEnd
sCode = "TC """ & aRng.Text & """ \l 1 "
ActiveDocument.Fields.Add Range:=aRngRef, Text:=sCode
End If
End With
Next aFN
Set aRng = ActiveDocument.Range
aRng.InsertParagraphAfter
aRng.Collapse wdCollapseEnd
sCode = "TOC \f "
ActiveDocument.Fields.Add Range:=aRng, Text:=sCode
End Sub
However, we can't ALSO use the instances of MyStyle in the body of the document because it appears that only Paragraph Styles can be used to build a TOC with styles.