![]() |
#5
|
||||
|
||||
![]()
Try:
Code:
Sub KeepRowsTogether() Dim oTbl As Table, oCel As Cell For Each oTbl In ActiveDocument.Tables With oTbl .Range.Paragraphs.KeepWithNext = True If .Uniform = True Then For Each oCel In .Rows.Last.Range.Cells oCel.Range.Paragraphs.Last.KeepWithNext = False Next oCel Else Set oCel = .Range.Cells(.Range.Cells.Count) Do While oCel.ColumnIndex > 1 oCel.Range.Paragraphs.Last.KeepWithNext = False Set oCel = oCel.Previous Loop oCel.Range.Paragraphs.Last.KeepWithNext = False End If End With Next oTbl End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
MerRob54 | Word | 6 | 01-28-2013 03:37 AM |
![]() |
donthaveaclue | Word Tables | 3 | 02-25-2011 07:54 AM |
![]() |
datto210 | Word Tables | 1 | 10-25-2010 12:39 PM |
![]() |
graham | Word Tables | 1 | 11-16-2009 08:51 AM |
Automatically recreate table on next page | oneononemedia | Word Tables | 0 | 08-16-2009 08:24 PM |