View Single Post
 
Old 02-03-2019, 07:49 PM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

One section or one hundred, each section has 3 headers (used or not).



Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey, http://gregmaxey.com/word_tips.html, 02/03/2019
Dim lngIndex As Long
Dim oSec As Section
  For Each oSec In ActiveDocument.Sections
    For lngIndex = 1 To 3
      MsgBox oSec.Headers(lngIndex).Range.Text
    Next
  Next
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote