Hi,I am generating a word document which contains several logical sections. Each logical section has its title and table. These section are cretaed at run time as per the input data. Since document is genrated run time and data is not fixed it happens some time that a section title comes on different page ( say page1) and table comes at different page (say page2). I want to display both tilte and table together at single page. How to do that ?

Thanks,I did that, but still table is splitting across page. What I want is if title and table does not fit for current page , both should move on to next page so that tiltle and table always views together. Actually I am using a pre created .docx file as base(template) an in that .docx file I have selected title paragarph and checked "Keep Next" true. But what it do it keeps header and other initial rows on same page and rest moved to next page. But I want Tiltle and whole table together on same page.

As you'll see if you Google "word keep table rows together", you need to do 2 things:

1. Prevent rows from breaking internally, by setting the tr property “Allow row to break across pages.” to false

2. Keep rows together. Select the entire row and enable the “Keep with next” property. Do this for every row of the table except the last. I think this has the effect of setting w:keepNext on each w:p in the table, but you should try it in Word and look at the resulting XML to confirm.

Perhaps you could post your resulting code for the benefit of others? thanks.