一次性全部打印按钮代码:
Dim Names() AS String = {"结果分析表","林种统计表","面积统计表","秋季验收表","补助测算表","坡度统计表","权属统计表","设计汇总表","设计统计表","投资测报表","预算汇总表","植被统计表","验收汇总表","二期补助表"}
For Each Name As String In Names
With Tables("分组统计")
.Select(0 ,0, .Rows.Count - 1, .Cols.Count - 1)
End with
Dim Book As New XLS.Book(ProjectPath & "Attachments\" & Name & ".xls") '打开模板
Book.Build() '生成细节区
Book.Save(ProjectPath & "Reports-:special:1:-& Name & ".xls") '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File =ProjectPath & "Reports-:special:1:-& Name & ".xls"
Proc.Start()
Next
[此贴子已经被作者于2009-11-14 18:53:53编辑过]