I am trying to write code that will find the word "Date:" in a word document and replace it with todays date. I've managed to get this far but all it seems to do is find and select it, not replace it.
Sub docsearch()
Set wd = CreateObject("word.application")
wd.Documents.Open ("C:\Documents and Settings\Owner\My Documents\downloads\work\M-F-380.1.doc")
wd.Visible = True
With wd.Application.Selection.Find
.Text = "Date:"
.Replacement.Text = "Datetest"
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
End Sub
Any ideas?
Thanks.