I have this simple sub in MS Word to search for a keyword.
It works fine, but the hits are highlighted in gray.
Q1. What line of code is needed to change to a more standout color (e.g. lt. yellow)?
Also, when a hit is found, the line containing the hit is always at the top of the screen.
Q2. How can I make it show 2 or 3 lines above the line of the hit, and still keep the highlight intact?
Dim FindText As String, Ask As Integer
FindText = InputBox("What would you like to search for?", "SEARCH FOR KEYWORD'")
If FindText = "" Then GoTo Stop1
Do Until Selection.Find.Found = False
Ask = MsgBox("Keyword was found - search for more?", vbYesNo, "SEARCH")
MsgBox "No more found!"
If Ask = vbNo Then Exit Sub