View Single Post
 
Old 04-28-2015, 05:07 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

I'm going to be out the rest of the day. This should resolve the table 9 issue:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim lngIndex As Long, lngLength As Long
Dim oRow As Row
 
  'check table 9
  Selection.GoTo What:=wdGoToBookmark, Name:="RM1a"
  Do
    Set oRow = Selection.Tables(1).Rows.Last
    lngLength = 0
    For lngIndex = 2 To 11
      If lngIndex <> 7 Then
        lngLength = lngLength + Len(oRow.Cells(lngIndex).Range.Text)
      End If
    Next lngIndex
    If lngLength = 18 Then
      Selection.Tables(1).Rows.Last.Delete
    Else
      Exit Do
    End If
  Loop
  Selection.Tables(1).Rows.Last.Borders(wdBorderBottom).Color = Selection.Tables(1).Rows.First.Borders(wdBorderTop).Color
End Sub
I don't know what you are after with your other question. Besides I've given you enough code that you should at least be able to try something on your own. If you can't work it out the post back.

Best Regards,
Greg Maxey

The dogs bark but the caravan moves on.
~ Persian Proverb
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote