tombaraider
Technical User
Can someone please tell me what needs to be added to this macro to make it loop til the end of any document I run it in? Thanks.
Selection.Find.ClearFormatting
With Selection.Find
.Text = "REPORT"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.EndKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
End Sub
Selection.Find.ClearFormatting
With Selection.Find
.Text = "REPORT"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.EndKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
End Sub