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
|