Check the building blocks organizer to ensure that the building block still exists.
Or you could simply insert the fields in the footers e.g.
Sub PageNumbers()
Dim oFooter As HeaderFooter
Dim oRng As Range
For Each oFooter In ActiveDocument.Sections(1).Footers
If oFooter.Exists Then
Set oRng = oFooter.Range
With oRng
.ParagraphFormat.Alignment = wdAlignParagraphRight
.Text = "Page "
.Collapse 0
.Fields.Add oRng, wdFieldPage, , False
.End = oFooter.Range.End
.Collapse 0
.Text = " of "
.Collapse 0
.Fields.Add oRng, wdFieldNumPages, , False
End With
End If
Next oFooter
lbl_Exit:
Set oFooter = Nothing
Set oRng = Nothing
Exit Sub
End Sub