Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Keep with Next and Merge Cells

1,195 views
Skip to first unread message

Rahul

unread,
Feb 8, 2008, 5:32:00 PM2/8/08
to
Hi,

I've a Table that I dont want to split accross pages. From one of the MVP
sites I found that the right way to do this is by unchecking the "Allow rows
to break accross pages" followed by "Keep with next" for all except the last
row.

Now I've a Table here that I did a merge cells on a few rows but only for
the first 3 columns.

The question is how do I not get the same behaviour? Which exactly is my
last row now? How does WQord handle these merged rows in its internal row
count?

Any advice?

Thanks!

-Rahul

Lene Fredborg

unread,
Feb 9, 2008, 4:29:01 PM2/9/08
to
As I understand your question, you have vertically merged cells that span the
last rows in one or more columns in the table (e.g. a table with 3 columns,
10 rows – cells 8-10 in column 1 are merged).

Word counts the last physical cell in a column as the last cell. However, if
you turn off "Allow row to break across pages", this should prevent any cell
from breaking across pages. Therefore, seen from a logical point of view, you
should always be able to prevent the table from breaking across pages if you
apply "keep with next" to all rows until the row that contains the topmost
cell that makes up the last cell in a column (a bit difficult to explain… -
in the example above: select the first 7 rows) – this also worked
consistently for me when testing.

If you select the columns individually one by one – without the last cell –
and apply "Keep with next", this will also keep the table on one page but it
is more cumbersome.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word

Rahul

unread,
Feb 13, 2008, 5:22:02 PM2/13/08
to

Thanks Lene! That worked great for me.

dsche...@gmail.com

unread,
Aug 2, 2012, 10:23:54 AM8/2/12
to
I'm having the same issue, but I want even the vertically merged cells to not break off. Is there a way for this to happen?

Thanks,
David Schenkler

Stefan Blom

unread,
Aug 2, 2012, 2:34:35 PM8/2/12
to
You haven't cited the original post in this (possibly old) thread, so I can't
tell what has been suggested earlier. Anyway, applying "Keep with next"
paragraph formatting to whole table rows should work even with merged cells. Are
you saying that it doesn't work for you?

--
Stefan Blom
Microsoft Word MVP




wrote in message news:5fe3d705-1880-4c93...@googlegroups.com...

dsche...@gmail.com

unread,
Aug 3, 2012, 9:02:28 AM8/3/12
to
Sorry, I didn't know that. I am new to this.
Yes, it did not work for me. But I decided to get rid of the code to disallow the row to break off pages, because the the table was really big, and since it ran off the page both vertically and horizontally anyway, and it looked really bad even after autofitting window and contents, I decided that not allowing the rows to break off pages was too much to ask for. Instead I am having other questions that are related to tables.

My Word template is set up so that it will merge the information from a different tool's program into MS Word. This way I get a nice report in Word. As such, I have to word the template a certain way, and then play with the document to make it look nice, hence the Macros. However, my problem lies with the tables. Sometimes there 2x2 (or bigger) tables that have the first column being labeled as what the other table will be saying.

Example:
--------------------------
|Dependents: | <<code>> |
|_____________|__________|
|Dependencies:| <<code>> |
|_____________|__________|

The <<code>> will turn into the information that is located in the other tool after running its program. My higher ups want to know two things:
1) Is there a way to make it so that if one of the cells is empty that that entire row is deleted?
2) No one is sure if they want a certain object in the generated reports or not. This object happens to be in a 2x2 table (as seen above). The template is simple and only 2 tables are in the template (both are the same thing, just labeled differently). But after running the tool's program, many tables will be generated. Is there a Macro code that can allow the person to decide if he/she wants these tables to be put in?

Thank you,
David Schenkler

Stefan Blom

unread,
Aug 3, 2012, 2:10:47 PM8/3/12
to
OK, so the problem is with applying "Keep with text" to merged cells in *code*.
You should ask this question in a programming group or forum, where you are more
likely to get a knowledgeable reply. You could try the programming forum at
Answers
(http://answers.microsoft.com/en-us/office/forum/customize?page=1&tab=all) or
some
MSDN forum (such as
http://social.msdn.microsoft.com/Forums/en-US/worddev/threads).

--
Stefan Blom
Microsoft Word MVP




wrote in message news:675ed6a7-55eb-4106...@googlegroups.com...

klaus.a...@gmail.com

unread,
Mar 18, 2015, 9:22:50 PM3/18/15
to
Hi - reviving this old, old thread again.

So I'm having the same issue. I have a table in which the first column contains a classification. So it spans (merged) multiple rows. The table is quite big and I won't to allow it to break between the classifications.

When I disable 'Allow row to break ...' it does not have any effect on the merged row.
I can enable 'Keep with Next' in paragraph but this does not have the required effect. If I enabled it on the merged row - the whole table is kept together. If I enabled it only on the first (and not the last) row behind the classification. It has not the expected effect, i.e. the last row is still cut off. If I enabled it on all classified row but not the merged classifier cell, the first row is kept as an orphan.

Is there a way to achieve what I'm after?
0 new messages