Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

Loop through sections

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 24 Nov 2005 16:45 GMT
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
Greg Maxey - 24 Nov 2005 17:02 GMT
Something like:

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

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Good morning,
>
[quoted text clipped - 6 lines]
>
> Daniel
Daniel - 24 Nov 2005 17:35 GMT
Thank you

> Something like:
>
[quoted text clipped - 15 lines]
> >
> > Daniel

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.