#1
|
|||
|
|||
Preventing cells from splitting into two pages
I have a program that prints stuff from Excel to Word so that it creates a table and keeps adding row to the table until what I'm "printing" to Word runs out. Sometimes this "print" is so long that it doesn't fit to the first page. I'm ok with that, but how do I say to Word that "Look, don't split the cell. If it doesn't fit to the first page, throw the whole cell to the next page".
Oh and I checked this one and although it is close, it doesn't answer to my specific question. https://www.msofficeforums.com/vba/6...-one-page.html since that keeps the whole table on one page, I'd be asking keeping only one cell on one page. |
#2
|
||||
|
||||
Hi Jaymond,
If your problem is that the cell is splitting, what you need to do is to select the table and choose Table Tools|Layout > Table > Properties > Row, then uncheck the 'allow row to break across pages' option. This can be done in code too. For example: Code:
ActiveDocument.Tables(1).Rows.AllowBreakAcrossPages = False
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Preventing users forwarding meeting invitations | outlook8 | Outlook | 4 | 07-10-2013 02:38 PM |
Preventing word/excel from trying to open external template locations | Perhill | Office | 0 | 03-02-2011 04:44 AM |
Count range cells eliminating merge cells | danbenedek | Excel | 0 | 06-15-2010 12:40 AM |
Keeping Tables from Splitting Between Pages | AlexPaoletti | Word Tables | 2 | 05-18-2010 01:17 AM |
Help Splitting and images in word 2007. | aligahk06 | Drawing and Graphics | 1 | 10-08-2009 12:58 AM |