Sub ReplaceInDocument
Dim wdReplaceAll
'set the value for the replace "constant"
wdReplaceAll = 2
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "^p"
.Replacement.Text = "replacement text "
.Forward = True
.Wrap = 1
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
'the Replace argument is the 11'th argument
.Execute , , , , , , , , , , wdReplaceAll
End With
End Sub
Sub ReplaceInDocument
Dim wdReplaceAll
'set the value for the replace "constant"
wdReplaceAll = 2
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "^p"
.Replacement.Text = "replacement text "
.Forward = True
.Wrap = 1
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
'the Replace argument is the 11'th argument
.Execute , , , , , , , , , , wdReplaceAll
End With
End Sub