I'm currently using this to change any word yellow:
Code: Select all
NumpadAdd:: {
; SendEvent("!+h") ; highlight
w := ComObjActive("Word.Application")
if (SubStr(w.Selection.Range.Text, -1) = ' ') ;
w.Selection.SetRange(w.Selection.Range.Start, w.Selection.Range.End - 1) ; these two lines deselect the trailing space
w.Selection.Range.HighlightColorIndex := 7 ; yellow
sound_pop()
w.selection.collapse(0)
}
Thanks!