Hi I have the following Macro and would like it to run until it reaches the end of the document. Any suggestions? Thanks
Sub Macro2()
Do Until S
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^#:^#^#"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute
Selection.EndKey unit:=wdLine
Selection.MoveDown unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Delete unit:=wdCharacter, Count:=2
Loop
End Sub
Sub Macro2()
Do Until S
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^#:^#^#"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute
Selection.EndKey unit:=wdLine
Selection.MoveDown unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Delete unit:=wdCharacter, Count:=2
Loop
End Sub