J
jabslim via DotNetMonster.com
hi guys! i need help with printing. i want to print it with the filename
"c:\testfile.doc". i use the code below for it to disable the use of color
ink, but it doesnt print anything.
---------------------------------------------------------------------------
Dim printDoc As New Printing.PrintDocument
Dim currentPageNumber
Dim printern
printern = "EPSON Stylus C59 Series"
' Set the printer name and ensure it is valid. If not, provide a
message to the user.
printDoc.PrinterSettings.PrinterName = printern
If printDoc.PrinterSettings.IsValid Then
' If the printer supports printing in color, then override the
printer's default behavior.
If printDoc.PrinterSettings.SupportsColor Then
' Set the page default's to not print in color.
printDoc.DefaultPageSettings.Color = False
End If
printDoc.DocumentName = "c:\testfile.doc" '(name of file i want
to print)
currentPageNumber = 1
printDoc.Print()
Else
MessageBox.Show("Printer is not valid")
End If
"c:\testfile.doc". i use the code below for it to disable the use of color
ink, but it doesnt print anything.
---------------------------------------------------------------------------
Dim printDoc As New Printing.PrintDocument
Dim currentPageNumber
Dim printern
printern = "EPSON Stylus C59 Series"
' Set the printer name and ensure it is valid. If not, provide a
message to the user.
printDoc.PrinterSettings.PrinterName = printern
If printDoc.PrinterSettings.IsValid Then
' If the printer supports printing in color, then override the
printer's default behavior.
If printDoc.PrinterSettings.SupportsColor Then
' Set the page default's to not print in color.
printDoc.DefaultPageSettings.Color = False
End If
printDoc.DocumentName = "c:\testfile.doc" '(name of file i want
to print)
currentPageNumber = 1
printDoc.Print()
Else
MessageBox.Show("Printer is not valid")
End If