Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 11-27-2015, 03:09 AM
macropod's Avatar
macropod macropod is offline Find and list Blank pages in Word document. Windows 7 64bit Find and list Blank pages in Word document. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
 

Tags
word 2007, word vba macro

Thread Tools
Display Modes


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
Find and list Blank pages in Word document. 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft