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