![]() |
|
#7
|
|||
|
|||
|
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
Best Regards, Greg Maxey The dogs bark but the caravan moves on. ~ Persian Proverb |
| Tags |
| empty cell delete row |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to delete all empty rows from all tables
|
braddgood | Word VBA | 15 | 10-02-2015 01:54 PM |
Delete empty cell and shift up
|
Linh | Word Tables | 1 | 09-21-2014 01:52 PM |
| Creating VBA Code to Delete Empty Column in Table | Faugs | Word VBA | 5 | 08-07-2014 03:29 PM |
| Delete lots of empty space between paragraphs. | FieldTechnician | Word | 4 | 10-25-2013 01:14 PM |
Macro to delete rows with all empty cells
|
ubns | Excel Programming | 2 | 08-14-2012 02:01 AM |