打印代码如下:
If Tables("托运单开单记录_table1").Current Is Nothing Then
Return
Else
Dim tm As String = ProjectPath & "Attachments\云南捷众物流有限公司托运单.doc" '指定模板文件
Dim fl1 As String = ProjectPath & "Reports\云南捷众物流有限公司托运单.doc" '指定目标文件
Dim fl2 As String = ProjectPath & "Reports\云南捷众物流有限公司托运单.pdf" '指定目标PDF文件
Dim wrt As New WordReport(Tables("所有开单记录库"),tm,fl1) '定义一个WordReport
wrt.Build() '逐行生成报表
wrt.SaveToPDF(fl2) '保存为PDF文件
wrt.Quit() '退出
Dim Proc As New Process '打开PDF文件
Proc.File = fl2
Proc.Start()
End If
会出现系统找不到指定文件,可是文件都在啊!什么情况?