S
Steved
Hello from Steved
Below I want to delete as you see in my Macro but it will stop at the bottom
off the page. Have you any solutions to my issue please. Thankyou.
All 8:0:1:1:3
Prz $3,600
Win 0%
Plc 25% L 1:0:1
R 7:0:1
F 0:0:0
Sub Win()
Dim i As Long
For i = 1 To ActiveDocument.Paragraphs.Count
If i > 1 Then
Set MyRange = ActiveDocument.Paragraphs(i).Range
MyRange.End = MyRange.Start + i
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Win [0-9]{1,}%"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Plc [0-9]{1,}%"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=2
End If
Next i
End Sub
Below I want to delete as you see in my Macro but it will stop at the bottom
off the page. Have you any solutions to my issue please. Thankyou.
All 8:0:1:1:3
Prz $3,600
Win 0%
Plc 25% L 1:0:1
R 7:0:1
F 0:0:0
Sub Win()
Dim i As Long
For i = 1 To ActiveDocument.Paragraphs.Count
If i > 1 Then
Set MyRange = ActiveDocument.Paragraphs(i).Range
MyRange.End = MyRange.Start + i
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Win [0-9]{1,}%"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=2
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Plc [0-9]{1,}%"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=2
End If
Next i
End Sub