S
Steved
Hello from Steved
The Below finds "1:25 Race" goes to the start of the line and inserts a
pagebreak,
Please what is required for it to function.
Sub Pagebreak()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[0-9]{1,2}:[0-9]{2}[ ^s]{1,}RACE"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do
Selection.Find.Execute
If Selection.Find.Found Then
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
Selection.MoveDown Unit:=wdLine
Selection.MoveDown Unit:=wdLine
End If
Loop While Selection.Find.Found
End With
End Sub
Thankyou.
The Below finds "1:25 Race" goes to the start of the line and inserts a
pagebreak,
Please what is required for it to function.
Sub Pagebreak()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[0-9]{1,2}:[0-9]{2}[ ^s]{1,}RACE"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do
Selection.Find.Execute
If Selection.Find.Found Then
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
Selection.MoveDown Unit:=wdLine
Selection.MoveDown Unit:=wdLine
End If
Loop While Selection.Find.Found
End With
End Sub
Thankyou.