Thread: [Solved] delete page break
View Single Post
 
Old 07-22-2013, 09:36 AM
seeker62 seeker62 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jul 2013
Posts: 9
seeker62 is on a distinguished road
Default delete page break

I want to delete page break using vba. This is what I am using:

Dim Rng As Range, iPage As Long
iPage = 2
With ActiveDocument
Set Rng = .GoTo(What:=wdGoToPage, Name:=iPage)
Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page")
Rng.Delete
End With

When I step through the value passed to Rng is "..................

how can the above code be changed to accomplish my purpose? Also need to change footer after i delete page break.
Reply With Quote