SetPrinter Method


Top  Previous  Next


Sets the printer to which all data should be sent by Raw Data Printer.


Syntax

object.SetPrinter([PrinterName])

Where object evaluates to a Raw Data Printer object.


The SetPrinter method has these arguments:


PartDescription  


PrinterNameString expression specifying the name of the printer to send the data to.  
 



Remarks

This method sets / changes the printer to which all data should be sent by the Raw Data Printer object. You can use the GetPrinters method to retrieve the names of all logical and physical printers installed / connected to the system, including network printers.

Note: This method does not change the Windows default system printer. It only sets the printer to which the data will be sent by the Raw Data Printer object, from now on. Any subsequent calls to the PrintRawData method, without specifying a printer name in the PrintRawData PrinterName argument, will send all data to the previously specified printer. When called again with another printer name, the data will be sent to the new printer from this point on.

See also the GetPrinters method.