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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top