Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

MS Word Table Fit On Page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vbnetdev - 10 Oct 2006 23:28 GMT
Is there a way to force a MS Word table to make it and its contents appear
on a single page regardless of what happens ot the data inside? Using vba on
Office 2000. I am pasting excel charts into the table and trying to make it
all fit on one page.
Jonathan West - 10 Oct 2006 23:47 GMT
> Is there a way to force a MS Word table to make it and its contents appear
> on a single page regardless of what happens ot the data inside? Using vba
> on Office 2000. I am pasting excel charts into the table and trying to
> make it all fit on one page.

If what you want to do is make sure that a table smaller than a page will
always start on the next page rather than allow a page break to occur in the
middle because the table starts near the bottom, then set the
ParagraphFormat.KeepWithNext property of the table's Range to True.

If you want to squeeze a table onto one page that is larger than a page,
then you have to reduce the font size of the text until it all fits.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

vbnetdev - 11 Oct 2006 14:18 GMT
Is there a way to detect if two pages exist in vba in Word? What I am
thinking is if I check that then I go in and reduce the size of the chart
until I get it on one page....

>> Is there a way to force a MS Word table to make it and its contents
>> appear on a single page regardless of what happens ot the data inside?
[quoted text clipped - 8 lines]
> If you want to squeeze a table onto one page that is larger than a page,
> then you have to reduce the font size of the text until it all fits.
Jonathan West - 11 Oct 2006 19:14 GMT
> Is there a way to detect if two pages exist in vba in Word? What I am
> thinking is if I check that then I go in and reduce the size of the chart
> until I get it on one page....

Yes. Look up the Information property. One of the options there returns the
page number of the active end of the range or selection. So you would
proceed as follows

1. Insert the table
2. repaginate the document
3. get the page numbers of the start & end of the document.
4. If the same, exit.
5. Shrink the table a bit
6. go to #2

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.