试试
Dim wrt As WordReport
If Forms("单").Controls("CheckBox2").checked=True Then
Dim tm As String = ProjectPath & "Attachments\水.doc" '指定模板文件
Dim fl As String = ProjectPath & "Reports\水.doc" '指定目标文件
wrt = New WordReport(Tables("单基表"),tm,fl) '定义一个WordReport
wrt.Build() '逐行生成报表
wrt.Print()
End If
If Forms("单").Controls("CheckBox3").checked=True Then
Dim tm As String = ProjectPath & "Attachments\尘.doc" '指定模板文件
Dim fl As String = ProjectPath & "Reports\尘.doc" '指定目标文件
wrt = New WordReport(Tables("单基表"),tm,fl) '定义一个WordReport
wrt.Build() '逐行生成报表
End If
wrt.quit