Dim T,T1,T2,T3,T4 As String
If FileSys.FileExists(ProjectPath & "Attachments\规格\" & Tables("订单情况").Current("IO") & "\ " & Tables("订单情况").Current("IO") & T3 & T2 & T4 & T & ".xls") Then '判断文件夹中有无这个文件
FileSys.DeleteFile(ProjectPath & "Attachments\规格\" & Tables("订单情况").Current("IO") & "\ " & Tables("订单情况").Current("IO") & T3 & T2 & T4 & T & ".xls") '如果有就将这个文件删除
End If
T = e.Form.Controls("ComboBox1").value
T1 = ProjectPath & "Attachments\" & T & ".xls"
T2 = e.Form.Controls("ComboBox8").value
T3 = e.Form.Controls("ComboBox5").value
T4 = e.Form.Controls("ComboBox10").value
If T isnot Nothing Then
If T.Indexof(T) > -1 Then
Dim Book As New XLS.Book(T1)
Book.Build()
Book.Save(ProjectPath & "Attachments\规格\" & Tables("订单情况").Current("IO") & "\ " & Tables("订单情况").Current("IO") & T3 & T2 & T4 &T & ".xls") '将打印出来的文件保存到相对应的文件夹中