代码一:
Dim Book As New XLS.Book(ProjectPath & "Attachments\资产标签.xls")
Dim fl As String = ProjectPath & "Reports\资产标签.xls"
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = fl
Proc.Verb = "Print" '指定动作
Proc.Start()
代码二:
Dim Book As New XLS.Book(ProjectPath & "Attachments\资产标签.xls")
Dim fl As String = ProjectPath & "Reports\资产标签.xls"
Book.Build()
Book.Save(fl)
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl)
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
App.Visible = True
ShowAppWindow("资产标签",2)
Ws.PrintPreview
App.Quit
老师,想在以上两个代码中(一个为预览,一个为直接打印)加入指定的打印机LQ-635K,请问如何加入代码.