View Single Post
 
Old 05-05-2014, 09:14 AM
konopca konopca is offline Windows XP Office 2010 64bit
Novice
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

Paul
I removed the x from this line. Is that okay? I have Word 2010 but I open all my files in compatiability mode.
strFile = Dir(strFolder & "\*.doc", vbNormal)

And when I recorded a macro for search and replace I got the following code but I'm not sure how much of it to incorporate. I also need:

1) All the headers to be changed
2) All the occurrences in the text layer, and
3) All the text boxes (which are not in the header)

Code:
 
Sub test()
'
' test Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "04-15-09"
.Replacement.Text = "05-05-14"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Thanks for your help.
Carol
Reply With Quote