Loop through sections

D

Daniel

Good morning,

How can I loop through each section of a document? I would like to go to
the 1st page of section 1 of the doc. perform an action, then move on to
section 2 and perform the same action, and so on and so on until I have gone
through all the sections in a document.

Thank you,

Daniel
 
G

Greg Maxey

Something like:

Sub ScratchMacro()
Dim oSec As Section
For Each oSec In ActiveDocument.Sections
MsgBox "Do something"
Next
End Sub
 
Top