Mega Code Archive
Declare the HeaderFooter object variable myHeader and assign to it the primary header in the first section in the active document
Sub headerFooter()
Dim myHeader As HeaderFooter
Set myHeader = ActiveDocument.Sections(1).Headers _
(wdHeaderFooterPrimary)
End Sub