G
Guest
I have a form with a 'print' command button that exports the data in the form fields from MS Access into MS Word form fields. I've followed the instructions from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnima02/html/ima0102.asp. My problem is with the section
With do
.FormFields("fldSalutation").Result = Nz(Me!TitleOfCourtesy
.FormFields("fldName").Result = Nz(Me!FirstName & " " & Me!LastName
.FormFields("fldTitle").Result = Nz(Me!Title
.FormFields("fldHireDate").Result = Nz(Me!HireDate
.FormFields("fldApprovedBy").Result = strReportsT
End Wit
If I try to add more than 6 lines between 'with doc' and 'end with' error messages '4120Bad Parameter. And, when I open the MS Word template, it will slowly populate the first few fields but then won't populate the remaining fields listed in the code.
With do
.FormFields("fldSalutation").Result = Nz(Me!TitleOfCourtesy
.FormFields("fldName").Result = Nz(Me!FirstName & " " & Me!LastName
.FormFields("fldTitle").Result = Nz(Me!Title
.FormFields("fldHireDate").Result = Nz(Me!HireDate
.FormFields("fldApprovedBy").Result = strReportsT
End Wit
If I try to add more than 6 lines between 'with doc' and 'end with' error messages '4120Bad Parameter. And, when I open the MS Word template, it will slowly populate the first few fields but then won't populate the remaining fields listed in the code.