vb.net 指定打印机打印
Dim exlApp As New Excel.Application, xlBook As Excel.Workbook, xlSheet As Excel.WorksheetxlBook = exlApp.Workbooks.Open(strPath)
exlApp.Application.ScreenUpdating = False
exlApp.Application.DisplayAlerts = False
For Each xlSheet In xlBook.Sheets
If xlSheet.Name = "XA" Then
WITH xlSheet
.Range("l3").Value=1
End With
End If
Next
exlApp.ActiveSheet.printout() '----这里打印出来为用系统默认打印机的 如何让他能弹出打印机选择框并选择指定打印机
xlBook.Close(False)
exlApp.Application.ScreenUpdating = True
exlApp.Application.DisplayAlerts = True
exlApp.Quit()
我尝试在代码运行时候用了PrintDialog 弹出打印机对框框并选择 但根本没作用,还是用默认的打印,请问有什么办法可以实现指定打印机打印