Dim tm As String = ProjectPath & "Attachments\123.doc" '指定模板文件 Dim fl As String = ProjectPath & "Reports\5.doc" '指定目标文件 Dim wrt As New WordReport(Tables("b1"),tm,fl) '定义一个WordReport For Each dr As Row In Tables("b1").rows wrt.BuildOne(dr) Next wrt.print '显示报表 wrt.quit