Well, I solved that task (To get header text from each/selected page) in simple way (it works in my case):
Code:
Function GetPageHeader(MyCurrentPage As Integer) As String
Set sel = Selection.GoTo(What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=mCPage)
GetPageHeader = ActiveDocument.Range.GoTo(What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=MyCurrentPage).Sections(1).Headers(wdHeaderFooterPrimary).Range.Text
End Function
We just go to needed page (by
Count:=MyCurrentPage) ang get it's first section's "PrimaHeader".
Well, we may have problems with section amount or correct number, but you can just loop it.
Selection.GoTo - helps in cases where you keep getting wrong (general) header.