font color

M

MarcoPolo

how can i change color for example font.color = wdColorRed
for the text i replace?

like this

Dim rDcm As Range
Set rDcm = ActiveDocument.Range
With rDcm.Find
.Text = strfind
.Replacement.Text = strReplace
.Execute Replace:=wdReplaceAll

....


end with


tia Marco
 
T

Tony Jollans

Just add a line ...

Dim rDcm As Range
Set rDcm = ActiveDocument.Range
With rDcm.Find
.Text = strfind
.Replacement.Text = strReplace
.Replacement.Font.Color = wdColorRed ' <====== Added
.Execute Replace:=wdReplaceAll

....


end with
 

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

Top