![]() |
|
#4
|
||||
|
||||
|
Whilst I agree with Andrew regarding the desirability of avoiding double rows, I think a macro can also be made to replicate the structure fairly reliably where such avoidance isn't practical. For example:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim RngSrc As Range, RngTgt As Range
With Selection
If .Information(wdWithInTable) = False Then Exit Sub
With .Tables(1)
Set RngSrc = .Rows(.Rows.Count - 1).Range
RngSrc.End = .Range.End
Set RngTgt = .Range
RngTgt.Collapse wdCollapseEnd
RngTgt.FormattedText = RngSrc.FormattedText
.Rows(.Rows.Count - 1).Range.Delete
.Rows(.Rows.Count - 1).Cells(1).Range.Text = (.Rows.Count - 1) / 2
End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBA Adding Rows To Table With Content Control | lord_kaiser | Word VBA | 2 | 08-01-2020 01:01 AM |
Add Rows to table that will include content controls of previous rows
|
bobsagat | Word VBA | 20 | 01-27-2020 08:00 AM |
Adding Rows to a Table
|
SuzeG | Word VBA | 8 | 01-02-2014 08:05 AM |
Grouping table rows to prevent individual rows from breaking across pages
|
dennist77 | Word | 1 | 10-29-2013 11:39 PM |
adding rows to word table
|
hklein | Word VBA | 4 | 07-18-2011 12:21 AM |