I found this script and it appeared to be what I needed. It is giving me any error 13. I've looked it up and don't really know what to do with it. It has to do with the data type. And again, I don't know anything about writing a script. Any ideas on what to do with it?
Private Sub NewUB92()
Dim strFinalDoc As String
Dim docWord As Word.Document
Dim appWord As Word.Application
Dim rstValues As Recordset
Set appWord = New Word.Application
Set docWord = appWord.Documents.Open("c:\ub92.doc")
appWord.Visible = True
**This is where I get an error. There is something wrong with this line and I can't figure out what it is**
Set rstValues = CurrentDb.OpenRecordset("UCRNptNumbers", dbOpenTable)
rstValues.MoveFirst
Do Until rstValues.EOF
With docWord.Content.Find
.Execute findtext:=rstValues!UCRN, _
Replacewith:=Nz(rstValues!ACCT, ""), _
Replace:=wdReplaceAll
End With
rstValues.MoveNext
Loop
rstValues.Close
Set rstValues = Nothing
appWord.ActiveDocument.Save
End Sub