R
robk
Hi
I'm trying to search the document for special word with all what after until
paragraph ends.
If you try manualy for Edit->Find , FindNext, you get askDialog that you
reached the EOF
and if you're answer is no it stops for searching.
Is there that condition (don't know how to tell). Look in my code:
For i = 0 To 100
Selection.Find.ClearFormatting
With Selection.Find
.Text = "PIL:*"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
If i > 0 Then
Selection.Find.Execute
End If
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
pil = pil + Selection.Text
' if it reached the end of file exit for
Next i
I'm trying to search the document for special word with all what after until
paragraph ends.
If you try manualy for Edit->Find , FindNext, you get askDialog that you
reached the EOF
and if you're answer is no it stops for searching.
Is there that condition (don't know how to tell). Look in my code:
For i = 0 To 100
Selection.Find.ClearFormatting
With Selection.Find
.Text = "PIL:*"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
If i > 0 Then
Selection.Find.Execute
End If
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
pil = pil + Selection.Text
' if it reached the end of file exit for
Next i