SQL fornatted by VBa

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top