BreakPage

G

Grigoriy

I greet all

I form in the macro table and I should make, so that several in a row going
table rows would not be transferred
(break row) to another page and they were located together on
one sheet.
As to make this?.
 
C

Chuck Henrich

You need to apply .AllowBreakAcrossPages=False and
..ParagraphFormat.KeepWithNext = True to the relevant rows.

The following is sample code, you'd need to specify your table/range
according to your needs. You could also use a selection to do what you want.

Dim rngRange As Range

With ActiveDocument
.Tables(1).Rows(4).AllowBreakAcrossPages = False
Set rngRange = .Tables(1).Rows(4).Range
rngRange.ParagraphFormat.KeepWithNext = True
End With

HTH
 

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