View Single Post
 
Old 07-23-2015, 06:14 PM
RickLegrand RickLegrand is offline Windows 8 Office 2013
Novice
 
Join Date: Jul 2015
Location: São Paulo, Brazil
Posts: 4
RickLegrand is on a distinguished road
Default

I really don't know, Paul. As I said before, I'm totally illiterate in VBA. Programming is for the young and adventurous ones, I'm too old for learning now. All I know of macros is using them. I was simply copying and trying them as per the instructions from the post you sent. To follow Robert's idea I first tested it and later I used the Record Macro button and executed the procedure by hand. And now the macro works right. Here is the code Word recorded automatically:

Sub CleanUpPDFText2()
'
' CleanUpPDFText2 Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(^13)([a-z])"
.Replacement.Text = "^32\2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

_______________
Cheers
Rick
Reply With Quote