A
adubb
i have a textbox in a custom outlook form. I am trying to merge the
information in that textbox to a field in microsoft word. however I am
getting a type mismatch error. here is my code in my outlook form:
Sub cmdPrint_Click()
Dim oWordApp
dim strMyField
dim oDoc
' Open a new document
Set oWordApp = CreateObject("Word.Application")
Set oDoc = oWordApp.Documents.Add("C:\Terminated Employee Checklist.dot")
' Set the first bookmark to the contact's full name
Set strMyField = Item.UserProperties.Find("FullName")
oDoc.FormFields("Text1").Result = strMyField
End Sub
information in that textbox to a field in microsoft word. however I am
getting a type mismatch error. here is my code in my outlook form:
Sub cmdPrint_Click()
Dim oWordApp
dim strMyField
dim oDoc
' Open a new document
Set oWordApp = CreateObject("Word.Application")
Set oDoc = oWordApp.Documents.Add("C:\Terminated Employee Checklist.dot")
' Set the first bookmark to the contact's full name
Set strMyField = Item.UserProperties.Find("FullName")
oDoc.FormFields("Text1").Result = strMyField
End Sub