参考:http://www.foxtable.com/webhelp/topics/2890.htm,比如
Dim drs As List(Of DataRow) = DataTables("出库").Select("出库日期 = #" & Date.Today & "#") '筛选出符合条件的行
If drs.Count > 0 Then '如果存在符合条件的行
Dim tm As String = ProjectPath & "Attachments\出库单.doc" '指定模板文件
For Each dr As DataRow In drs '逐行生成报表
Dim fl As String = ProjectPath & "Reports\出库单" & dr("出库单号") & ".doc" '指定目标文件
Dim wrt As New WordReport(Tables("出库"), tm, fl) '定义一个WordRepor
wrt.BuildOne(dr)
wrt.Quit()
Next
End If