View Single Post
 
Old 04-15-2009, 01:37 PM
Bird_FAT's Avatar
Bird_FAT Bird_FAT is offline Office 2007
Expert
 
Join Date: Apr 2009
Location: South East
Posts: 271
Bird_FAT is on a distinguished road
Default

The Reading Highlight is designed to highlight only while reading that session - It isn't meant to save!

If you wish to find and highlight a word throughout your document so that you can save it, then try this little macro - copy the entire code below and add it to an module in the VBA window (Alt+F11 > Insert > Module > (double-click the new Module) > Paste the code > replace the word "Quick" with "your word or string", then go to the View tab, click Macros > view and run the one called 'Find_and_highlight_Loop') - that should do the trick and save the highlight for you!


Code:
Sub Find_and_Highlight_Loop()
'
' This macro will find the word in speech marks "", select it, highlight it and
' then move on and find the next one until it reaches the end of the document.
'
' To add more words, then copy the text between the markers and paste after the
' last marker
' Don't forget to replace the word ;-)

' <---------------->
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "Quick"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
        Do While Selection.Find.Execute
            Options.DefaultHighlightColorIndex = wdYellow
            Selection.Range.HighlightColorIndex = wdYellow
        Loop
' <---------------->

End Sub
;-)
Reply With Quote