Keep with Next and Merge Cells

Discussion in 'Word Tables' started by Rahul, Feb 8, 2008.

  1. Rahul

    Rahul Guest

    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
     
    Rahul, Feb 8, 2008
    #1
    1. Advertisements

  2. 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" wrote:

    > 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, Feb 9, 2008
    #2
    1. Advertisements

  3. Rahul

    Rahul Guest

    Thanks Lene! That worked great for me.


    "Lene Fredborg" wrote:

    > 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" wrote:
    >
    > > 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
     
    Rahul, Feb 13, 2008
    #3
  4. Rahul

    Guest

    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
     
    , Aug 2, 2012
    #4
  5. Rahul

    Stefan Blom Guest

    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:...

    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, Aug 2, 2012
    #5
  6. Rahul

    Guest

    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 thatentire row is deleted?
    2) No one is sure if they want a certain object in the generated reports ornot. 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



    On Thursday, August 2, 2012 2:34:35 PM UTC-4, Stefan Blom wrote:
    > 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:...
    >
    >
    >
    > I'm having the same issue, but I want even the vertically merged cells tonot
    >
    > break off. Is there a way for this to happen?
    >
    >
    >
    > Thanks,
    >
    > David Schenkler




    On Thursday, August 2, 2012 2:34:35 PM UTC-4, Stefan Blom wrote:
    > 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:...
    >
    >
    >
    > I'm having the same issue, but I want even the vertically merged cells tonot
    >
    > break off. Is there a way for this to happen?
    >
    >
    >
    > Thanks,
    >
    > David Schenkler
     
    , Aug 3, 2012
    #6
  7. Rahul

    Stefan Blom Guest

    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:...

    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



    On Thursday, August 2, 2012 2:34:35 PM UTC-4, Stefan Blom wrote:
    > 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:...
    >
    >
    >
    > 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




    On Thursday, August 2, 2012 2:34:35 PM UTC-4, Stefan Blom wrote:
    > 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:...
    >
    >
    >
    > 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, Aug 3, 2012
    #7
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    1
    Views:
    83
    Suzanne S. Barnhill
    Dec 9, 2003
  2. deebeesss
    Replies:
    2
    Views:
    138
    deebeesss
    Apr 13, 2004
  3. Clive Long,UK
    Replies:
    3
    Views:
    98
    Clive Long,UK
    Nov 15, 2004
  4. Ben
    Replies:
    1
    Views:
    153
    Helmut Weber
    Aug 25, 2005
  5. jackosullivan
    Replies:
    3
    Views:
    122
    Suzanne S. Barnhill
    Sep 16, 2005
  6. Dmitry
    Replies:
    3
    Views:
    111
    Stefan Blom
    Jun 8, 2006
  7. AdrianB
    Replies:
    3
    Views:
    113
    AdrianB
    Jul 12, 2006
  8. Gowgirl4
    Replies:
    1
    Views:
    160
    Lene Fredborg
    Oct 9, 2007
Loading...