Hi ive created a macro to search through a folder containing documents, im wanting to search through the documents and change a date within the files.
the document contains a release date Like :
Release Apr 06
but it could be :
Release May 06
so i need to search through the documents like this :
Release ???????
and once it finds the release date to replace the date to a set constant of "Jan 06"
here is part of the code :
'Replaces all release dates with the new date
With Selection.Find
.ClearFormatting
'We allow the replacement of 7 chrs
.Text = "Release ???????"
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchFuzzy = False
.MatchWildcards = True
If .Found = True Then
With .Replacement
.ClearFormatting
.Text = m_dateReplacement
End With
blnFoundReleaseDate = .Found
.Execute Replace:=wdReplaceAll, Wrap:=wdWrapAlways
End If
.Execute Format:=False, Forward:=True
End With
for some reason when it finds a date that needs to be changed, it wont change it
any pointers would be greatly appreciated.
thanks
the document contains a release date Like :
Release Apr 06
but it could be :
Release May 06
so i need to search through the documents like this :
Release ???????
and once it finds the release date to replace the date to a set constant of "Jan 06"
here is part of the code :
'Replaces all release dates with the new date
With Selection.Find
.ClearFormatting
'We allow the replacement of 7 chrs
.Text = "Release ???????"
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchFuzzy = False
.MatchWildcards = True
If .Found = True Then
With .Replacement
.ClearFormatting
.Text = m_dateReplacement
End With
blnFoundReleaseDate = .Found
.Execute Replace:=wdReplaceAll, Wrap:=wdWrapAlways
End If
.Execute Format:=False, Forward:=True
End With
for some reason when it finds a date that needs to be changed, it wont change it
any pointers would be greatly appreciated.
thanks