Deletion of Empty Page in the Word Document through VBA

K

Kiruthiga

This is to request for your help in this MS Word issue. In the VB application
we are required to copy and paste temporary documents (containing text,
pictures, etc) into a single, final word document.

The main document contains tables and the issue is related w.r.to tables. In
the current application, the .rtf file is formed from the html file.

While copying, the blank pages get inserted in the document if the control
is in the ‘last but one’ row of a table and sometimes if the control is in
the last row during document generation process. This causes the extra page
in the document and page numbers are counted for this.



We are working on Windows 2000 Server as our OS.



In the existing code, section breaks (Next Page) are used. I am trying to
scan each and every page and finding if any empty page is there. If so, I
have planned to pass the delete key to delete the empty page.



Could you provide any pointers as how to go about this?



Any help in this issue would be greatly appreciated. If any sample code
available to solve the issue will be helpful for me.
 
D

Dawn Crosier

You might try jumping to the paragraph mark immediately following the
table and setting the font size = 1. In most instances that works for
me. It makes the following line small enough to fit on the previous
page.

See also http://sbarnhill.mvps.org/WordFAQs/BlankPage.htm

--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"

This message is posted to a newsgroup. Please post replies and
questions to the newsgroup so that others can learn as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top