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 / July 2007

Tip: Looking for answers? Try searching our database.

Preventing page break in table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Branaugh - 26 Jul 2007 16:16 GMT
I have a table that I would like to prevent from spanning across pages.   I
created the following macro.

        Dim aTable As Table
        For Each aTable In ActiveDocument.Tables
              aTable.Select
              aTable.AllowPageBreaks = False
        Next aTable
     
    This works when the document is open, but if you save the document and
open it again, the table is once again spanning multiple pages.

Any thoughts or ideas.
Thanks
Bob Branaugh
zkid - 26 Jul 2007 16:34 GMT
A bit confused here.  If the table is spanning multiple pages, then doesn't
it NEED to flow?  Are you referring to keeping each ROW from splitting across
a page but letting the table continue on as needed?

If so, then try this:  aTable.Rows.AllowBreakAcrossPages = False

> I have a table that I would like to prevent from spanning across pages.   I
> created the following macro.
[quoted text clipped - 11 lines]
> Thanks
> Bob Branaugh
Branaugh - 26 Jul 2007 16:38 GMT
Just a point of clarification, I do not want the table to break across pages.
It is a short table that can and must fit on a single page.

> I have a table that I would like to prevent from spanning across pages.   I
> created the following macro.
[quoted text clipped - 11 lines]
> Thanks
> Bob Branaugh
zkid - 26 Jul 2007 18:08 GMT
Then, there must be some hidden codes or something that is causing it to
break across the page.  If it doesn't contain any confidential information,
I'd be happy to take a look at it for you.  If so, send it to (collapse the
spaces, and reverse it, of course) c o x . n e t @ z i v d

> Just a point of clarification, I do not want the table to break across pages.
>  It is a short table that can and must fit on a single page.
[quoted text clipped - 14 lines]
> > Thanks
> > Bob Branaugh
Jonathan West - 27 Jul 2007 09:28 GMT
>I have a table that I would like to prevent from spanning across pages.   I
> created the following macro.
[quoted text clipped - 11 lines]
> Thanks
> Bob Branaugh

Set the KeepWithNext property of every paragraph within the table to be
True.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

 
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.