![]() |
|
|
|
#1
|
||||
|
||||
|
Try: Code:
Sub Demo()
Dim i As Long, Rng As Range, StrPages As String
With ActiveDocument
For i = 1 To .ComputeStatistics(wdStatisticPages)
Set Rng = .GoTo(What:=wdGoToPage, Name:=i)
Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page")
If Len(Rng) < 3 Then StrPages = StrPages & " " & Rng.Information(wdActiveEndAdjustedPageNumber)
Next
End With
StrPages = Replace(Trim(StrPages), " ", ", ")
MsgBox "The following pages are empty:" & vbCr & StrPages
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Thank you so much!
It worked. Its really helping me. Thanks once again.
|
|
| Tags |
| word 2007, word vba macro |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can word: make variables, find appropriate pages, fill out pages with variables, print only those | 20GT | Word VBA | 1 | 10-15-2014 09:48 PM |
| Removing blank pages at the end of a document | Xanzia | Word | 3 | 06-01-2014 11:13 AM |
| Word and other word processors print blank pages | jrasicmark | Word | 5 | 05-28-2014 03:10 PM |
Unable to retain section page numbering while removing the blank pages in MS word 201
|
ramsgarla | Word | 3 | 10-01-2012 03:52 AM |
| delete blank pages from mail merge document | blusea | Word | 0 | 12-17-2010 06:10 PM |