Thread: [Solved] Continuous Loop
View Single Post
 
Old 01-06-2011, 04:43 PM
cksm4 cksm4 is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Aug 2010
Posts: 48
cksm4 is on a distinguished road
Default Continuous Loop

Can anyone help me figure out why this loop is not stopping?

Selection.Find.ClearFormatting
With Selection.Find
.Text = "DO NOT PUBLISH ACTIVITY"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
While Selection.Find.Execute
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.SelectRow
Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend
With Selection.Font
.Hidden = True
End With
Wend

Much appreciated!!!
Reply With Quote