Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    blank pages after deleting range (VBA / Word xp / windows xp)

    I am using VBA to delete a section of a word document from a starting point to an end point. When I run this code, the delete works, but I'm left with a blank page in my document. How can I get it to work so that the text readjusts itself so that there aren't any blank pages? ps. could someone please reply to my last post - i would really appreciate getting some insight!

    Taibe

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: blank pages after deleting range (VBA / Word xp / windows xp)

    Word can't have a completely blank page, there must be something on it, even if it is only a paragraph mark or a page break.

    Can you enable Tools > Options > View > All and see what is on your "blank" page.
    Is this the first page in the document? Or the last one? Or just in the middle somewhere?
    How are you selecting the text to delete?

    StuartR

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: blank pages after deleting range (VBA / Word xp / windows xp)

    If you are deleting a Section (capital S), perhaps you are leaving an end-of-section marker that is adding a page break? Deleting Section markers can wreak havoc with formatting, so solving one problem could create others...

  4. #4
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: blank pages after deleting range (VBA / Word xp / windows xp)

    Thanks, I'm not deleting Section objects, just my own definition of sections within the document. Actually, I'm marking off the sections with text in brackets eg. [Title Page] (before the title page section) and [end title page] (at the end of it). I was deleting everything from the first [ to the final ]. Now, I got smart and am deleting everything from the ] of the end of the previous section to the [ of the beginning of the next section (providing of course that they're not the first or last sections of the document. It seems to be working better now.

  5. #5
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Lakewood, New Jersey, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: blank pages after deleting range (VBA / Word xp / windows xp)

    Thanks for the tip, Stuart. I did "view all" and found a lot of things that needed fixing in the template that I'm working with. I received this template from someone else, and did not realize there was so much "gobbledy-gook" in it. <img src=/S/doh.gif border=0 alt=doh width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •