There is no printer called <name>.

The SetDefaultPrinter method accepts only the names of currently installed printers. This error generally occurs if you specify the printer port instead of the name of the printer, or if you use the name of a printer that is not currently installed.

To correct this error

  1. Check the names of the currently installed printers and make sure the specified printer is installed.

  2. Check the spelling of the printer path for typing errors.

  3. Make sure the networked printer is online.

See Also

Reference

SetDefaultPrinter Method

EnumPrinterConnections Method

AddWindowsPrinterConnection Method