>I am writing a program to create a report in Word using Word tables to list data. As I add a new table, I set the table and rows so neither break across pages.
>
>However I find that what can happen is that the first row of a table (containing a the main header) can be at the bottom of one page and the rows of data on the next page! Is there a way around this problem?
>
>I was thinking that if there was a way of checking the vertical position in a page, I could put in a page break before creating the table. Or is there an equivalent to a paragraph's KeepWithNext property?
>
>I've tried using RelativeVerticalPosition & VerticalPosition without success. It seems to me there must be a way to work out where you are on a page as Word displays the line numbers as you cursor down the page. Maybe it's not available in the object model?
>
>Thanks for any help,
>
>Stewart
I just want to point out that you can make Word repeat a row from the table (or more than one) as headers - they will be printed on each page. However, it can still happen that this table header prints at the bottom of the page, and then immediately gets repeated on the next page, so you may still need to insert manual page-breaks. I am not sure how to do this with Automation.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)