老师,我在控件里写了以下代码,点击该组件时提示如图1的异常,该程序是放在D盘的。
For Each r3 As Row In Tables("转采购合同_转合同").GetCheckedRows
r3("转采购合同") = _UserName
r3("合同打印日期") = Date.Today()
Next
DataTables("转采购合同_转合同").Save()
Dim Book As New XLS.Book(ProjectPath & "Attachments\采购订单合同.xlsx")
Dim fl As String = ProjectPath & "Reports\采购订单合同.xlsx"
Dim str As String = "-1,"
Dim t As Table = e.Form.controls("转合同").Table
For Each r As Row In t.GetCheckedRows
str &= r("_Identify") & ","
Next
Dim f As String = t.Filter
t.Filter = "[_Identify] in (" & str.trim(",") & ")"
book.sheets(0)(8,14).value = "<ALL>"
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
t.Filter = f
Dim Proc As New Process '打开工作簿
Proc.File = fl
'Proc.Verb = "Print" '指定动作
Proc.Start()
此主题相关图片如下:1.png
![dvubb 图片点击可在新窗口打开查看](UploadFile/2024-8/202481210312920302.jpg)