I want to print from Excel to Postscript then print to a printer. How can I specify duplex and staple before sending the print job to the printer.
I've been looking at the PrintTicket class. It looks promising. But I'm using WinForms project with .net 3.5.
I really don't want to set up multiple print queues if I don't have to. So how do I control the duplex and staple options?
Public Shared Function PrintSheetsToPS(ByVal wb As Excel.Workbook, _
ByVal arr As Array, _
ByVal PSFileName As String) As String
Dim svInputPS As String = TempPath & PSFileName
IO.File.Delete (svInputPS)
wb.Worksheets(arr).PrintOut(PrintToFile:=True, _
PrToFileName:=svInputPS, _
ActivePrinter:=PSPrinterName)
Return svInputPS
End Function
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…