I came up with this site: http://forums.codeguru.com/showthread.php?15568-WRITING-DATA-TO-WORD-DOCUMENT-FROM-VB
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
Dim wd As Word.Application
Dim wdDoc As Word.Document
wd = New Word.Application
wd.Visible = True
wdDoc = wd.Documents.Add("D:\Employees.dotx") 'Add document to Word
With wdDoc
.FormFields("E_Name").Result = txtLastName.Text [error]
.FormFields("E_NName").Result = txtFirstName.Text
.FormFields("E_Address").Result = txtMiddleName.Text
End With
wdDoc.PrintPreview() 'Opens print Preview Window
wdDoc.SaveAs("D:\doc1.DOC") 'Saves the Document
wd.Application.Quit() 'Closing Word Application
wd = Nothing 'Releasing References to Variable
End Sub
Error: The requested member of the collection does not exist.
Can anyone help me with connecting microsoft word with VB.net