non-breaking range

J

Jan Kucera

Hi,
can I set a range to be "unbreakable" over pages? I expect that puting it
into one cell table will do the thing, but I'm just looking for something
more... macro friendly.. ;-)

Thanks,
Jan
 
D

Doug Robbins - Word MVP

You will also need to format them so that their lines are kept together.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jan Kucera

Hi,
thanks for replies, unfortunately, in the range there can be anything,
including tables. I have such selection and I manually set to keep with next
and keep lines together, as well as I have not allowed the rows in table to
split accross pages. So I have some text, then a table. I want it all to be
together, but the first line of the table is on the end of the page and the
rest of the table is on the other page, although it is set to not to be...

Thanks,
Jan
 
D

Doug Robbins - Word MVP

You could probably use Selection.Information(wdActiveEndPageNumber) to check
if the beginning of the range and the end of it are on the same page and
insert a page break before the range if they are not. Of course, if it
won't all fit on one page, you cannot do it other than by changing the font
size, etc.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jan Kucera

Thank you for the hint, I didn't know about that ;-) but I'm replicating
these ranges in xml so I'm not able to check where they are on the page.
Jan
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top