Removing a section from a document

J

Jackie

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.
 
G

Greg

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
 

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