I have the following simple keyword search sub that basically works for my purposes, however it highlights the hits in dull gray. How can I modify the code to change the (temporary) highlight color to something more visible (e.g. light pink)?
Sub Word_Find() Dim FindText As String, Ask As Integer Selection.HomeKey wdStory FindText = InputBox("What would you like to search for?", "SEARCH FOR KEYWORD'") If FindText = "" Then GoTo Stop1 Selection.Find.Execute FindText Do Until Selection.Find.Found = False Ask = MsgBox("Found - search for more?", vbYesNo, "SEARCH") Selection.MoveRight Selection.Find.Execute Loop Stop1: MsgBox "No more found!" If Ask = vbNo Then Exit Sub End Sub




Reply With Quote