View Single Post
 
Old 04-27-2015, 06:15 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Here is another way. An empty cell has a text length = 2. A row marker has a text length = 2. So an empty row with three cells has a text length = 8.

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
  Do
    If Len(Selection.Tables(1).Rows.Last.Range.Text) = 8 Then
      Selection.Tables(1).Rows.Last.Delete
    Else
      Exit Do
    End If
  Loop
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote