Get a printer name.
getPrinterName([in] int printerIdx, [out, retval] BSTR *printerName)
This function returns the name of the printerIdxth available printer.

printerIdx must be between 0 and n-1, where n is the value returned by getNumPrinters.

Note: getNumPrinters and getPrinterName are just simple wrappers around Windows functions. There is no requirement to use these functions if you already know the printer name that you want to use.

nPrinters = viewer.getNumPrinters For i = 0 To nPrinters - 1 printerName = viewer.getPrinterName(i) print "printer " & i & ": " & printerName Next i