View Single Post
 
Old 06-02-2011, 05:30 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Hi brad,

Try:
Code:
Sub DeleteEmptyCol2TableRows()
Application.ScreenUpdating = False
Dim Tbl As Table, i As Long
With ActiveDocument
  For Each Tbl In .Tables
    With Tbl
      For i = .Rows.Count To 1 Step -1
        If Len(.Rows(i).Range.Text) = .Rows(i).Cells.Count * 2 + 2 Then .Rows(i).Delete
      Next i
    End With
  Next Tbl
End With
Application.ScreenUpdating = True
End Sub
Note: The macro may fail on tables with vertically-merged cells.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote