Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Keep Text Together in a Table (Word 2000 SR-1)

    Hi, all,

    I have a table that consists of 3 columns. The first column is narrow and contains just a number. The second column is also narrow and contains a title that can be from two lines to five or six lines. The third column for comments is wide and can contain a single paragraph or multiple paragraphs.

    The problem I'm having is that I want Word to respect Widow/Orphan control for the text comments. Although the style of these paragraphs has Widow/Orphan control turned on, Word is not respecting it. The other thing I want to do is to make sure the titles in the 2nd column are kept together. Word is not respecting the Keep Lines Together option set for the titles in the 2nd column.

    For short rows, I can turn off the Allow Row to Break Across Pages option, but most of the rows are rather lengthy, so I don't want to use that feature because the pages will be too short.

    Any ideas?

    Thanks!

    - Linda

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keep Text Together in a Table (Word 2000 SR-1)

    Hi Linda:
    Keep lines together doesn't work within tables; neither does widow/orphan. Under certain circumstances, checking Keep With Next will keep paragraphs together. It will keep the last sentence in a cell that ends with a paragraph mark with the next paragraph. Howerver, this is a hit & miss operation.

    I don't know of a completely satisfactory solution. You can split the table by using Ctrl+Shift+Enter or a page break by using Ctrl+Enter in an effort to break where you want. Of course, if you have many edits, this is a nightmare.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keep Text Together in a Table (Word 2000 SR-1)

    Thanks for your reply, Phil. I'm sorry to hear that there aren't any good options, but I appreciate the info.

    - Linda

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Keep Text Together in a Table (Word 2000 SR-1)

    Linda,

    I think there might be a kludgy way of doing it but creating a solution would take somewhat smarter than me. It also might depend a little on your data for cols 2 and 3, which are the cols with potentially lots of lines.

    The solution would involve a VBA macro that would look at the number of lines in the table row for col 2 and for col 3. If there's a way to determine for the "current row" (eg, either that you've selected it so the macro knows which row to examine or the macro just steps thru each row of the table) that the current row only has 1 line of text on the current page but the rest of the row is on another page, then it is a widow or an orphan (depending on whether that 1 row is at the bottom of a page or at the top of a page). I think this can be done by examining
    - the vertical position of the 1st line of text of the row relative to the page; and
    - the vertical position of the last line of text of the row relative to the page.

    I once did a macro that examined the position on the page of the last row in a table relative to the page position. The object was to fill the page with rows to the bottom to make it look like a form where not all rows needed to be filled in but you wanted empty rows to print out anyway; you just didn't want to add them manually. You may also have to look at the page numbers of the first and last line of the row in question.

    If the vertical positions or page numbers of the first/last line of text in the row are such that your table row appears on more than 1 page (eg, page numbers are different), then you also need to see if the vertical position of the first/last line in the suggests that it is the only row on the table. Once you've determined that (ie, a table row contains a widow or orphan), here's the kludgy part.

    If the first line of text of the table row is the last line on a page (I think this is the widow): do something to force the row onto the next page. It's not hard to do any number of things; it's just a question of deciding what to do (e.g., add a blank row w/o borders; extend the row above by adding a para mark to col 3 to foce it to be another line longer; etc).

    If the last line of text of the table row is the first thing on a page (I think this is the orphan): you'd have to replace the row by 2 new "rows" where
    - the first row goes on the earlier page with 1 less line of text
    - the second row goes on the next page with 1 more line of text.

    I don't think it would be hard to rearrange the 1 real row with the 2 "replacement" rows as described above. Of course, filling the rows would have to account for both cols 2 and 3.

    Another issue you'd have to address: what if col 2 and 3 have, say, 4 lines of text on the first page and col 2 has another 5 lines on the second page but col 3 has only 1 line on the second page. Do you want the above to reshuffle so that col 2 has 3+6 lines on the respective pages and col 3 has 3+2 lines on the respective pages. This is harder than if the longer col is the only thing creating an orphan.

    Of course, there's the issue of what if you add text above the real row in question. I think the macro could take this into account because a "split row" (2 rows created per above where you only had 1 originally) would presumably not have an entry in col 1 (this would be important for recombining).

    Anyway, I think it can be done. But I don't have the time now nor the intelligence. I'm just saying it bcs one of the moderators threw out a challenge to engineers doing these kinds of insoluable problems when I responded to the "fill the table to the bottom of the page" problem.

    Hoping there's some engineers out there for you.

    Fred

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keep Text Together in a Table (Word 2000 SR-1)

    Fred,

    Thank you very much for your analysis. I sincerely appreciate the time and thought you put into your response. You got me thinking now!

    - Linda

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •