Dim cr As Row = Tables("某表").Current Dim Book As New XLS.Book(ProjectPath & "Attachments\合同评审表.xls")'打开模板 Dim fl As String = ProjectPath & "Reports\合同评审表.xls" If cr("订单种类") = "开发样品" Or cr("订单种类") = "修订样品" Or cr("订单种类") = "常规样品" Then '如果样品单,则打印样品评审单 fl = ProjectPath & "Reports\样品评审单.xls" End If Book.Build() '生成细节区 Book.Save(fl) '保存工作簿 Dim Proc As New Process '打开工作簿 Proc.File = fl Proc.Verb = "Print" '指定动作 Proc.Start()
|