Hi Gabriel,
you are encountering problems with the end-of-row mark.
Have a look at this one,
somewhat simplified for ease of testing.
You have selected the end-of-row mark,
if the selection in within a table
and the selection.cells count is zero.
Sub Test45()
Dim rWrd As Range
For Each rWrd In ActiveDocument.Range.Words
'just for visual help
rWrd.Select
If selection.Information(wdWithInTable) = True Then
If selection.Cells.Count = 0 Then
' do nothing
End If
Else
rWrd.FormattedText.Font.Color = WdColor.wdColorAutomatic
rWrd.HighlightColorIndex = WdColorIndex.wdNoHighlight
rWrd.Shading.BackgroundPatternColorIndex _
= WdColorIndex.wdNoHighlight
rWrd.Shading.ForegroundPatternColorIndex _
= WdColorIndex.wdNoHighlight
End If
Next
End Sub

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Helmut Weber - 09 Dec 2006 02:44 GMT
Hi,
not my day, not my time,
> If selection.Cells.Count = 0 Then
> ' do nothing
> End If
redundant, absolutely useless.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Klaus Linke - 11 Dec 2006 20:02 GMT
I put such "do nothing" comment lines all the time in "If ... Then" or
"Select Case" statements...
Just to make it clear what was intended.
Klaus
> Hi,
>
[quoted text clipped - 5 lines]
>
> redundant, absolutely useless.
Disregard the other two postings.
It may serve as an excuse for coding nonsense,
that Word crashed invariably when testing,
more than a dozen times.
Try to adapt this one to your needs:
Sub Test455()
Dim rWrd As Range
For Each rWrd In ActiveDocument.Range.Words
'just for visual help
rWrd.Select
If selection.Information(wdWithInTable) = True Then
If selection.Cells.Count = 1 Then
rWrd.Font.Color = wdColorRed
' or whatever
End If
Else
rWrd.Font.Color = wdColorRed
' or whatever
End If
Next
End Sub
HTH

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Gabriel - 10 Dec 2006 12:17 GMT
Thank you Helmut so much.
That cells= 1 did the trick ..
in debt ..
Gabriel