View Single Post
 
Old 06-24-2017, 05:51 PM
eduzs eduzs is offline Windows 10 Office 2010 32bit
Expert
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default

Thanks gmaxey
Cause I don't now how many ^p^p^p... the text have, my macro should keep changing ^p^p to ^p till there's no more "^p^p", but just "^p", your code seems to do a single find and replace.

Dim oRng As Range

Set oRng = ActiveDocument.Range

Application.ScreenUpdating = False

With oRng.Find

.Text = "^13{2}" (I got a error with "2," so I removed the ,")
.Replacement.Text = "^p"
.MatchWildcards = True
.Execute

End With
__________________
Backup your original file before doing any modification.
Reply With Quote