Results 1 to 8 of 8

Thread: Keyword Search Hit Color

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Keyword Search Hit Color

    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")
    MsgBox "No more found!"
    If Ask = vbNo Then Exit Sub
    End Sub
    Last edited by Aussiebear; 09-27-2023 at 12:44 AM. Reason: Added code tags to supplied code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts