Delete Section Break

G

Greg

Andy,

The following deletes the section break immediately above the insertion
point. You could easily adapt it to delete the one after.

Sub DeleteSectionBreak()
Dim i As Integer
Dim j As Integer
i = 1
j = Selection.Sections(1).Index
If i < ActiveDocument.Sections.Count Then
Selection.GoTo What:=wdGoToSection, Which:=wdGoToAbsolute, Count:=j
Selection.MoveLeft
Selection.Delete
End If
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