Thread: [Solved] Delete blank pages
View Single Post
 
Old 09-06-2014, 05:16 AM
Dimsok Dimsok is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Sep 2014
Location: exUSSR
Posts: 50
Dimsok is on a distinguished road
Default Delete blank pages

Is there a way to delete blank pages in the end of document? I did try that:

Public Sub DeleteBlankPage()

Selection.GoTo What:=wdGoToBookmark, Name:="\page"

If isBlankSelection Then

Selection.Delete

End If

End Sub

Public Function BlankPageSelection()

For Each c In Selection.Characters

If (c <> vbCr And c <> vbTab And c <> vbFormFeed And c <> " ") Then

BlankPageSelection = False

Exit Function

End If

Next

BlankPageSelection = True

End Function


Read more :

but no sucess
Reply With Quote