View Single Post
 
Old 02-03-2019, 08:06 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

There are potentially three headers in each section of the document. Your macro accesses one of them. If you want them all you need to loop through the sections and the headers in those sections e.g.


Code:
Dim oSection As Section
Dim oHeader As HeaderFooter
    For Each oSection In ActiveDocument.Sections
        For Each oHeader In oSection.Headers
            If oHeader.Exists Then
                MsgBox oHeader.Range.Text
            End If
        Next oHeader
    Next oSection
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote