PDA

Click to See Complete Forum and Search --> : underlining in word


smileyface5
Feb 24th, 2005, 05:53 PM
i am looking for text in the word doc and then underlining it. it underlines but i cannot get the color to change from automatic this is what i am doing :

With ActiveDocument.Range.find
.Text = errortxt
.MatchWholeWord = True
.Replacement.Font.Underline = wdUnderlineWavy
'i tried this
.Font.UnderlineColor = wdColorRed
'and this
.Replacement.Font.UnderlineColor = wdColorRed
.Execute replace:=wdReplaceAll
End With

and neither work.
this works
ActiveDocument.Range.Font.UnderlineColor = wdColorRed

but that changes the colour of every underline in the document, which is not what i want

any suggestions??

RobDog888
Feb 24th, 2005, 06:15 PM
Try Or'ing your constants together.
.Replacement.Font.Underline = wdUnderlineWavy Or wdColorRed