Daniel,
Below is an example I had handy that I used in a VBScript file but the code
could easily have been run from inside a VBA routine. In this case, I was
making changes to fields within a specific Word document but could have
easily done a find and replace for other items.
If the file you're working with is an actual text document rather than a
Word document, the "Scripting.FileSystemObject" might be an even more
efficient approach. What type text file is it and how complex is the find
and replace operation?
________________________________
Const wdSaveChanges = -1
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("C:\Scripts\Test1.doc")
For Each itemField In objDoc.Fields
strCode = itemField.Code.Text
strCode = Replace(strCode, "DATE", "CREATEDATE")
strCode = Replace(strCode, "TIME", "CREATEDATE")
itemField.Code.Text = strCode
Next
objDoc.Close(wdSaveChanges)
objWord.Quit
________________________________
Steve