View Single Post
 
Old 04-27-2015, 02:42 PM
vibor vibor is offline Windows XP Office 2003
Novice
 
Join Date: Feb 2015
Posts: 5
vibor is on a distinguished road
Default

Thank you Guessed and gmaxey,

The solution from gmaxey is working ( Whoow!).
Great great! Thanks.

I Have 2 tables, 1 with 4 and one with 3 coulombs.
So the code is:

HTML Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
 
'check table 11
Selection.GoTo What:=wdGoToBookmark, Name:="Nr11"
Do
If Len(Selection.Tables(1).Rows.Last.Range.Text) = 10 Then
Selection.Tables(1).Rows.Last.Delete
Else
Exit Do
End If
Loop
'Check table 15
Selection.GoTo What:=wdGoToBookmark, Name:="Nr15"
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
Although this is working OK, I have still 2 problems.
1st. is the make up/cosmetic:
The inner horizontal lines of the table are gray, the borders and the vertical lines are black.
After the scratch the bottom line is grey. What can I do about it?

2nd.
There is another table in my document with 11 coulombs.
In coulomb 1 and 7 is always a number present.
How can I ignore coulombs 1 and 7?

I hope you can help me. It would be very nice.

GrtZ ViBoR
Reply With Quote