Specifies the printer to print to. Only the exact printer name strings as they appear on Internet Explorer's Print dialog can be specified. If the string does not exist or is written incorrectly, printing will be directed to the default printer.


printing.currentPrinter =sPrinterName


This a read/write property. With JScript, take care to double a backslash if one appears in the printer name.


The internal implementation of writing to the currentPrinter property is exactly the same as writing to the printer property, other than the implementation of currentPrinter does not 'eat' any error. Therefore an error in currentPrinter will be reported in the same way as any other error that occurs in an ActiveX object property/method call (e.g. in javascript, an error with be thrown that can be caught by the use of a try ... catch block)


factory.printing.currentPrinter = \\\\FS-LYS-01\\HP5n-759; // print to \\FS-LYS-01\HP5n-759

Applies To


See Also

printerEnumJobs, EnumPrinters, GetJobsCountPrint