View Single Post
 
Old 04-15-2009, 03:31 PM
bobk544 bobk544 is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Apr 2009
Posts: 10
bobk544 is on a distinguished road
Default

Ok just tried that BIRD and it worked great, plus i learned some interesting new techniques at the same time, so the problem was well worth the learning experience! here's the result!

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!


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