Dim tm As String = ProjectPath & "Attachments\地市.docx" '指定模板文件 Dim t As Table = Tables("信息") For i As Integer = t.TopPosition To t.BottomPosition Dim r As Row = t.Rows(i) Dim fl As String = ProjectPath & "Reports\" & r("序号") & r("区域") & ".docx" '指定目标文件 Dim wrt As New WordReport(t,tm,fl) '定义一个WordReport wrt.Buildone(r) '逐行生成报表 wrt.quit Next