Lists all macros contained in one or more files (the file array MyTemplateList():
Return to List
For i = 1 To UBound(MyTemplateList())
Documents.Open (MyTemplateList(i))
' counts the number of modules associated with the normal template
For k = 1 To ActiveDocument.VBProject.VBComponents.Count
Count = Count + 1
ReDim Preserve MyMacroList(2, Count)
MyMacroList(1, Count) = ActiveWindow.Caption
MyMacroList(2, Count) = ActiveDocument.VBProject.VBComponents.Item(k).Name
Next
ActiveDocument.Close (wdDoNotSaveChanges)
Next
For i = 1 To UBound(MyMacroList(), 2)
Selection.InsertAfter Text:=MyMacroList(1, i) & Chr(9) & MyMacroList(2, i) & Chr(13)
Selection.START = Selection.End
Next