J
jean-paul.bataille
Bonjour from Paris (France)
I import a text in Word, this text is an export of queries in .txt.
I want to colorized in red (wdColorRed) the first word following "For" or "join" in the all text.
My present code :
For Each Para In ActiveDocument.Paragraphs
'cherche le texte et le selectionne
With Selection.Find
.ClearFormatting
.Text = "FROM" 'can be "JOIN"
.Execute Forward:=True
End With
'Recuper le numéro de VRAI paragraphe word
NumParag = ActiveDocument.Range(Start:=1,NumParag = ActiveDocument.Range(Start:=1,End:=Selection.End).Paragraphs.Count
myParag = ActiveDocument.Paragraphs(NumParag).Range
'mise en forme manuelle
myParag.Font.Color = wdColorBlue ???????
Next Para
Thanks in advance for your help
JPB
I import a text in Word, this text is an export of queries in .txt.
I want to colorized in red (wdColorRed) the first word following "For" or "join" in the all text.
My present code :
For Each Para In ActiveDocument.Paragraphs
'cherche le texte et le selectionne
With Selection.Find
.ClearFormatting
.Text = "FROM" 'can be "JOIN"
.Execute Forward:=True
End With
'Recuper le numéro de VRAI paragraphe word
NumParag = ActiveDocument.Range(Start:=1,NumParag = ActiveDocument.Range(Start:=1,End:=Selection.End).Paragraphs.Count
myParag = ActiveDocument.Paragraphs(NumParag).Range
'mise en forme manuelle
myParag.Font.Color = wdColorBlue ???????
Next Para
Thanks in advance for your help
JPB