View Single Post
 
Old 06-27-2012, 02:13 PM
Charles Kenyon Charles Kenyon is offline Windows Vista Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,474
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Try:
Code:
Sub Macro1() ' 
' Macro1 Macro ' 
' 
Selection.Find.ClearFormatting 
Selection.Find.Highlight = True 
With Selection.Find 
.Text = "the" 
.Replacement.Text = "the" 
.Forward = True 
.Wrap = wdFindContinue 
.Format = True 
.MatchCase = False 
.MatchWholeWord = False 
.MatchWildcards = False 
.MatchSoundsLike = False 
.MatchAllWordForms = False
.Execute
End With 
Selection.Copy
End Sub
Your code sets up the find criteria but doesn't run the find. I haven't tried this, but I've done a lot of coding for replace. I expect it will work.

See How to modify a recorded macro

Last edited by Charles Kenyon; 06-27-2012 at 02:15 PM. Reason: clean up code
Reply With Quote