Hello,
I am trying to open a Word template, fill some fields, and mark some
check boxes as checked. Here is the code I am using:
' Launch Word and load the report template
Set objWord = New Word.Application
objWord.Documents.Add _
Application.CurrentProject.Path & "\PEFA_Field_Sheet.dot"
objWord.Visible = True
Set rst = New ADODB.Recordset
rst.Open strSQL, CurrentProject.Connection
rst.MoveFirst
' Update Word template
With objWord.ActiveDocument.Bookmarks
If Not IsNull(rst.Fields("USGS_Quad")) Then
.Item("USGS_Quad").Range.Text = rst.Fields("USGS_Quad")
End If
If Not IsNull(rst.Fields("park_code")) Then
.Item("park_code").Range.Text = rst.Fields("park_code")
End If
End With
objWord.ActiveDocument.formfield("Ledge_cliff").Ch eckBox.Value
= True
The form opens and the fields fill as expected, but Access crashes on
the last line with the error message "Object doesn't support this
property or method."
I have triple checked the name on the template checkbox and I have
tried all manner of different syntax in the instruction, but no luck.
Can anyone help?
Thanks.
ParkMan