Hi,
I've done this before but seem to be doing something wrong now. I want
change the date in a bunch of docs.
I'm using the following code. It changes it in the first doc but doesn't
move to the next.
For Each aDoc In Documents
With Selection.Find
.Text = "01/29/07"
.Replacement.Text = "03/01/07"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.Execute Replace:=wdReplaceAll
End With
ActiveDocument.Save
ActiveDocument.Close
Next aDoc
Thanks,
Mickey
Jonathan West - 31 Jan 2007 18:26 GMT
> Hi,
> I've done this before but seem to be doing something wrong now. I want
[quoted text clipped - 19 lines]
> Thanks,
> Mickey
Change this
With Selection.Find
to this
With aDoc.Range.Find
and this
ActiveDocument.Save
ActiveDocument.Close
to this
aDoc.Save
aDoc.Close

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Doug Robbins - Word MVP - 31 Jan 2007 18:31 GMT
See the article "Find & ReplaceAll on a batch of documents in the same
folder" at:
http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Hi,
> I've done this before but seem to be doing something wrong now. I want
[quoted text clipped - 19 lines]
> Thanks,
> Mickey