PeterMoran
MIS
Hi,
I have this macro I recorded to do some fiddling with subsequent lines every time it finds "Singles".
I want this to be repeated until the end of the document, which I can't seem to work out after some investigation.
Here is the macro:
Any suggestions greatly appreciated!
Peter Moran
I have this macro I recorded to do some fiddling with subsequent lines every time it finds "Singles".
I want this to be repeated until the end of the document, which I can't seem to work out after some investigation.
Here is the macro:
Code:
Sub FrOpenSinglesLines()
' FrOpenSinglesLines Macro
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Singles"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeBackspace
Selection.TypeText Text:=" "
Selection.HomeKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.TypeBackspace
Selection.TypeText Text:=" "
Selection.HomeKey Unit:=wdLine
Selection.Range.Case = wdNextCase
End Sub
Any suggestions greatly appreciated!
Peter Moran