Problem with seperate rows on a new page

P

p@nnie

Hi there!

I'm making an application that convert xml-files to one word-document.
(first convert to html, than read the file in word and save as .doc,
finally merge it all together.)
All works fine except that I found out that word automatically split
rows when the table doesn't fit on one page and the result is that by
printing the document, the last line is printed half... (although the
preview is perfect)
I know there is an option on Table properties where you can unselect
the property: separate rows on a new page.

But the problem is I don't know how to do it in VBA!!!

Can anybody help me please?

thx in advance,

An
 
M

Mark Tangard

Hi An,

To stop all rows in a table from breaking:

Selection.Tables(1).Rows.AllowBreakAcrossPages = False

To stop just a given row from breaking:

Selection.Tables(1).Rows(2).AllowBreakAcrossPages = False

I've often wished this were something you could include within
the "Set as default for new tables" option in the Insert Table
dialog. Since you can't, I find it useful to build a generic
empty table whose rows are set not to break, and store it as
an AutoText.
 

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