![]() |
#7
|
|||
|
|||
![]()
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
mohsen.amiri | Word | 2 | 02-19-2015 11:38 PM |
Wildcard Find/Replace deletes extra character | Cosmo | Word | 1 | 06-20-2014 08:49 AM |
![]() |
anacond11 | Word | 2 | 08-08-2013 08:10 AM |
Is it possible to include a newline character in the replace text | desgordon | Word | 2 | 09-14-2012 02:28 AM |
![]() |
bostonboi | Word | 1 | 01-16-2011 01:54 PM |