CurrentPrinter

Returns or changes the current Windows printer.

Syntax

Rhino.CurrentPrinter ([strPrinter])

Parameters

strPrinter

Optional.  String.  The name of a Windows printer as returned by this method or by the PrinterNames method.

Returns

String

If strPrinter is not specified, the name of the current Windows printer if successful.

String

If strPrinter is specified, the name of the previously current Windows printer if successful.

Null

If not successful, or on error.

Example

Dim arrPrinters, strPrinter

arrPrinters = Rhino.PrinterNames

If IsArray(arrPrinters) Then

strPrinter = Rhino.CurrentPrinter

strPrinter = Rhino.ListBox(arrPrinters, "Current: " & strPrinter, "Set Current Printer")

If Not IsNull(strPrinter) Then

Rhino.CurrentPrinter strPrinter

End If

End If

Also See

PrinterNames

SpoolToPrinter