|
-
Apr 3rd, 2003, 07:17 AM
#1
Thread Starter
Frenzied Member
Remove blank pages word
Does anybody know a way to remove all blank pages from a Word document. An empty page is a page that contains only the ---page break -- and the --enter-- charater. Any code-snippet would be great
-
Apr 3rd, 2003, 08:33 AM
#2
PowerPoster
An empty page is a page that contains only the ---page break -- and the --enter-- charater
I assume you mean that this is YOUR spec for an empty page. In general an empty page does not have an enter char, it's just two contiguous page break tokens.
On the other hand, if you're talking about a page that LOOKS empty, then it could have any combination of space chars, tabs, enter chars and possible other non-printing characters in between two page break tokes, so unless you are sure that YOUR empty pages are exactly one enter char between page break tokens, you'll need to be careful how you do this.
-
Apr 3rd, 2003, 09:10 AM
#3
Thread Starter
Frenzied Member
You correct, I have 2 be more specific: How do I remove all pages from a word document that LOOK empty???
-
Apr 3rd, 2003, 03:49 PM
#4
PowerPoster
pseudo code
isolate one page worth of text into a temporary string
use "replace" to get rid of all blanks, CR's, LF's, tabs, etc
see if string is now empty
on empty string, delete one page break token
have fun.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|