This example selects the footer and adds a page number.
With ActiveDocument.ActiveWindow.ActivePane.View
.Type = wdPrintView
.SeekView = wdSeekCurrentPageHeader
End With
If Selection.HeaderFooter.IsHeader = True Then
ActiveDocument.ActiveWindow.ActivePane.View _
.SeekView = wdSeekCurrentPageFooter
End If
Selection.HeaderFooter.PageNumbers.Add