If you want to colour the letters in the two words as shown, then
Code:
Sub Macro1()
'Graham Mayor - http://www.gmayor.com - Last updated - 13 Jun 2017
Const sFind As String = "posting|question"
Dim vFind As Variant
Dim oRng As Range
Dim i As Integer
vFind = Split(sFind, "|")
For i = 0 To UBound(vFind)
Set oRng = ActiveDocument.Range
With oRng.Find
Do While .Execute(FindText:=vFind(i))
Select Case i
Case Is = 0
oRng.Start = oRng.Start + 2
Case Is = 1
oRng.Start = oRng.Start + 3
End Select
oRng.End = oRng.Start + 2
oRng.Font.ColorIndex = wdRed
oRng.Collapse 0
Loop
End With
Next i
End Sub
If you want to do something with the words already containing the coloured letters then
Code:
Sub Macro2()
'Graham Mayor - http://www.gmayor.com - Last updated - 13 Jun 2017
Dim oRng As Range
Const strList As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Set oRng = ActiveDocument.Range
With oRng.Find
.Font.ColorIndex = wdRed
Do While .Execute
oRng.MoveEndWhile strList
oRng.MoveStartWhile strList, wdBackward
'do something with the word e.g.
oRng.Font.ColorIndex = wdBlue
'end of word process
oRng.Collapse 0
Loop
End With
End Sub