Results 1 to 4 of 4

Thread: Remove blank pages word

  1. #1

    Thread Starter
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    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

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    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.

  3. #3

    Thread Starter
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611
    You correct, I have 2 be more specific: How do I remove all pages from a word document that LOOK empty???

  4. #4
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    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
  •  



Click Here to Expand Forum to Full Width