Selection.Range.DupliCate.Find Problem
-
Hi All I have created a macro to identify a word "and" and highlight it in a word document First Look at my Macro Function Public Sub AmESerialComma() CheckDate TurnOnTrackChanges Call Home With Selection.Find .ClearFormatting .Text = ",[!.]@ and [!.]@." .MatchWildcards = True .Execute Do While .Found With Selection.Range.Duplicate .Find.Execute FindText:=" and " .Start = .Start + 1: .End = .End - 1 .HighlightColorIndex = wdBrightGreen End With .Execute Loop End With Call Home RestoreTrackChanges End Sub My problem is that when it Goes In "With Selection.Range.Duplicate" Loop the first time it Capture "and" & highlight it .but next time "Selection.Range.Duplicate" is always comes Empty..So its going in Infinite Loop... Can Any Body solve this problem,,I think after Highligting the text its not getting out from loop.. Please Show me some way