alrizwan
12-21-2010, 08:27 PM
Dear gmaxey!
you sent me this vba code thanks I want to chage text color from other different colors exept black color your code chages the color of all Documents at once
but I want to search other color one by one and change in black color
thanks.
Sub ScratchMacro()
Dim oRng As Word.Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Highlight = True
While .Execute
oRng.HighlightColorIndex = wdYellow
Wend
End With
Set oRng = ActiveDocument.Range
oRng.Font.Color = wdColorBlack
End Sub
you sent me this vba code thanks I want to chage text color from other different colors exept black color your code chages the color of all Documents at once
but I want to search other color one by one and change in black color
thanks.
Sub ScratchMacro()
Dim oRng As Word.Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Highlight = True
While .Execute
oRng.HighlightColorIndex = wdYellow
Wend
End With
Set oRng = ActiveDocument.Range
oRng.Font.Color = wdColorBlack
End Sub