Link to home
Start Free TrialLog in
Avatar of rrhandle8
rrhandle8Flag for United States of America

asked on

Word VBA Delete pages with only a "Page Break"

I generate multiple page document, and must enter Page Breaks at certain points.  Sometimes the end result is a document with some blank pages that contain only a Page Break.  I need to delete those pages.
Is there a way to read the top line of each page so I can test if it is a page break? Or can I grab the contents of a page, and if the contents are only 2 characters long (the is the number of characters for a page page), then delete the Page Break?
Open to suggestions.
Avatar of Bill Prew
Bill Prew

Please upload a sample Word document with the situation.


»bp
Avatar of rrhandle8

ASKER

See attached
Table1.docx
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Worked great.
Again, glad I could help.