Dim tm As String = ProjectPath & "Attachments\新装终端标准工事piao.doc" '指定模板文件
Dim fl As String = ProjectPath & "Reports\新增终端\" & Tables("终端台账").Rows(Tables("终端台账").Position)("站名") & "新装终端标准工事piao" & ".doc" '指定目标文件
Dim wrt As New WordReport(Tables("终端台账"),tm,fl) '定义一个WordReport
wrt.Build() '逐行生成报表
wrt.quit
Dim tm1 As String = ProjectPath & "Attachments\新装电能表工事piao模板1.doc" '指定模板文件
Dim fl1 As String = ProjectPath & "Reports\新增终端\" & Tables("电流互感器台账").Rows(Tables("电流互感器台账").Position)("主键") & "新装电能表标准工事piao" & ".doc" '指定目标文件
Dim wrt1 As New WordReport(Tables("电流互感器台账"),tm1,fl1) '定义一个WordReport
wrt1.Build() '逐行生成报表
wrt1.quit
Dim proc As new Process
proc.File = fl
proc.Start
Dim proc1 As new Process
proc1.File = fl1
proc1.Start
[此贴子已经被作者于2017/12/28 15:34:02编辑过]