View Single Post
 
Old 09-01-2018, 11:53 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Because your tables have merged cells, some circumlocution is required:
Code:
Sub Add_Rows_Table()
Application.ScreenUpdating = False
Dim Tbl As Table, Rng As Range
For Each Tbl In ActiveDocument.Tables
  With Tbl
    .Rows.Add
    Set Rng = .Range
    .Range.Cells(.Range.Cells.Count).Range.InsertBreak Type:=wdColumnBreak
    Rng.Tables(2).Range.Cells.Merge
    .Range.Characters.First.Previous.InsertBefore vbCr
    .Range.Characters.First.Previous.Previous.FormattedText = Rng.Tables(2).Range.FormattedText
    Rng.Tables(2).Delete
    .Range.Characters.First.Previous.Delete
    .Range.Characters.Last.Next.Delete
  End With
Next Tbl
Set Rng = Nothing
Application.ScreenUpdating = True
End Sub
You might find it interesting to step through the code...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote