Merging Data into Word and Want Checkboxes (Yes/No data type)

A

Ang2459

I am trying to merge data from my access database into word. I have several
items that are checkboxes in access. How do i get those checkboxes to merge
into word so that i see them. Right now they just produce numbers if they
are checked or not. Thanks
 
P

PatHartman

I'm not sure you can do with with a straight mail merge. The following is a
snippet of code from one of my applications. The app relies on documents
that have already been bookmarked with simple bookmarks (for fields longer
than 255 characters), checkboxes (for y/n fields), and textboxes for
everything else. The merging is data driven. The application loops through
the recordset where the data exists and joins to a table that contains the
field type and bookmark name.

......
.....
If rsDAO!ControlType = "Memo" Then
If IsNull(rsDAO!MemoValue) Then
If rsDAO!RequiredFlag = True Then
MsgBox "Required field - " & rsDAO!FieldDescription &
- is missing", vbOKOnly
Else
WordDoc.FormFields(rsDAO!BookMarkName).result = ""
End If
Else
WordDoc.Unprotect
WordDoc.BookMarks(rsDAO!BookMarkName).Range.Fields(1).result.Text
= rsDAO!MemoValue
End If
Else
If IsNull(rsDAO!TextValue) Then
If rsDAO!RequiredFlag = True Then
MsgBox "Required field - " & rsDAO!FieldDescription &
" - is missing", vbOKOnly
Else
WordDoc.FormFields(rsDAO!BookMarkName).result = ""
End If
Else
If rsDAO!ControlType = "Checkbox" Then
If rsDAO!TextValue = "Yes" Then
WordDoc.FormFields(rsDAO!BookMarkName).CheckBox.value
= True
Else
WordDoc.FormFields(rsDAO!BookMarkName).CheckBox.value
= False
End If
Else
WordDoc.FormFields(rsDAO!BookMarkName).result =
rsDAO!TextValue
End If
End If
End If
rsDAO.MoveNext
Loop
 
Top