Hi,
I have a series of documents all containing lots of 2 column tables with multiple rows. Each cell in the first column contains an image with some text underneath. I want to prevent the image the text in the first column from being separated over a page - they should always stay together, no page break between them.
I tried to use 'Keep with next' in the style for the paragraph containing image but this has doesn't behave as you would expect in the table. It moves the whole table to the next page.
I tried to set 'Keep with next' on each first paragraph in the cells in the first column using VBA, with the same result.
I don't want to prevent the row from breaking across pages because the content in the second column can be very long.
My next idea was to use VBA to try to test if there is a page break between the image and the text, then if there is stop that row from breaking across the page. This is where I get stuck. I can't see how to check if there's a page break between 2 paragraphs. Any ideas how to do this?
Any other suggestions how to solve the problem very welcome.
Thanks,
Daniel
I have a series of documents all containing lots of 2 column tables with multiple rows. Each cell in the first column contains an image with some text underneath. I want to prevent the image the text in the first column from being separated over a page - they should always stay together, no page break between them.
I tried to use 'Keep with next' in the style for the paragraph containing image but this has doesn't behave as you would expect in the table. It moves the whole table to the next page.
I tried to set 'Keep with next' on each first paragraph in the cells in the first column using VBA, with the same result.
I don't want to prevent the row from breaking across pages because the content in the second column can be very long.
My next idea was to use VBA to try to test if there is a page break between the image and the text, then if there is stop that row from breaking across the page. This is where I get stuck. I can't see how to check if there's a page break between 2 paragraphs. Any ideas how to do this?
Any other suggestions how to solve the problem very welcome.
Thanks,
Daniel