|
SelectPrinter - Setting the application's default printerAverage Rating: 2/5 | Rate this item | 11 users have rated this item.
|
Tip formerly from VB2TheMax
Expertise: Intermediate
Language: VB6
September 15, 2003
SelectPrinter - Setting the application's default printer
' Set the printer with the input name as the default printer for *this
' application* (not for the whole system)
Function SelectPrinter(ByVal printer_name As String) As Boolean
Dim i As Integer
SelectPrinter = False
For i = 0 To Printers.Count - 1
' if the specified printer is found, select it and return True
If Printers(i).DeviceName = printer_name Then
Set Printer = Printers(i)
SelectPrinter = True
Exit For
End If
Next i
End Function
Iouri
If you have a hot tip and we publish it, we'll pay you. However, due to accounting overhead we no longer pay $10 for a single tip submission. You must accumulate 10 acceptable tips to receive payment. Be sure to include a clear explanation of what the technique does and why it's useful. If it includes code, limit it to 20 lines if possible. Submit your tip here.
|