[RESOLVED] How to find in returns(vbcrlf) in VBA
Code:
With Selection.Find
.Text = vbCrLf & vbCrLf
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
MsgBox Selection.Find.Execute
The above code returing false value. please help me to replace two ENTERS to one ENTER.
Re: How to find in returns(vbcrlf) in VBA
Code:
With Selection.Find
.Text = "^13^13"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
MsgBox Selection.Find.Execute
Click Here to read more about this topic.
Re: How to find in returns(vbcrlf) in VBA
Code:
With ActiveDocument.Range.Find
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do
.Text = "^p^p"
.Replacement.Text = "^p"
Loop Until .Execute = False
End With
Re: How to find in returns(vbcrlf) in VBA
then how to find string ^13.
please dont mistake me, I am just asking
Re: How to find in returns(vbcrlf) in VBA
Quote:
Originally Posted by anhn
Code:
With ActiveDocument.Range.Find
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do
.Text = "^p^p"
.Replacement.Text = "^p"
Loop Until .Execute = False
End With
thank you