I am trying to send some Excel data to a Word Document Form Field. I have the following code in my Excel Sheet:

Sub Letter_BillNow_OneContact() 'letter

Dim wdApp As Object, wd As Object, ac As Long, ws1 As Worksheet, ws2 As Worksheet
Set ws1 = Worksheets("COA Template")
Set ws2 = Worksheets("Entity List")
On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set wdApp = CreateObject("Word.Application")
End If
On Error GoTo 0
Set wd = wdApp.Documents.Open("G:\COA\Letters - To Clients, etc\Charlotte Letters\ Completed & Billed Project Cover Letter.doc")
wdApp.Visible = True
With wd
.formfields("contact").result = ws1.Range("contact").Value
.formfields("greeting").result = ws1.Range("contact").Value
.formfields("project").result = ws1.Range("project").Value
.formfields("project2").result = ws1.Range("project").Value
.formfields("address").result = ws1.Range("address").Value
.formfields("csr").result = ws1.Range("csr").Value
.formfields("invoicenum").result = Left(Right(ws2.Range("G25").Value, 14), 7) & "-00"

End With
Set wd = Nothing
Set wdApp = Nothing
End Sub


The bug happens at the first ".formfield" command. I can't see what I am doing wrong. Can anyone offer some insight?

Thanks.