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 / Long Documents / September 2005

Tip: Looking for answers? Try searching our database.

Removing a section from a document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jackie - 07 Sep 2005 12:26 GMT
I want to write a macro to allow users to remove the first section of a
document (a drafting sheet).  Any tips on the best way to do this to
retain the headers/footers on the sections which are left - and also is
there a way of 'instructing' Word to remove a particular section rather
than just highlighting and deleting the text and section breaks.
Greg - 08 Sep 2005 19:19 GMT
I suppose that I would start with something like this:

Sub ScratchMacro()
With ActiveDocument
 .Sections(2).Headers(wdHeaderFooterPrimary).LinkToPrevious = False
 .Sections(1).Range.Delete
End With
End Sub
 
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.