Hi,

I recorded the following macro.
The macro can insert a footer.

However, when I run it again, it does not work.
I got the following message

Run-time error '5941':
The requested member of the collection does not exist.

How can I solve this problem?


[vba]
Sub Insert_Footer()

WordBasic.ViewFooterOnly
ActiveDocument.AttachedTemplate.BuildingBlockEntries("Alphabet").Insert _
Where:=Selection.Range, RichText:=True

End Sub

[/vba]

Thanks