I'm trying to set the default 'active' printer with the code below but my report always goes to the windows default printer and not the one I selected.
The line oImaging.PrintSetActivePrinter(nLoop) returns .f.
I'm using an XP machine logged in as administrator.
I wondered if you had any ideas?
- Code: Select all
oImaging = CreateObject("gdpicturepro5s.imaging")
oImaging.SetLicenseNumber("xxxxxxx")
nPrinters = oImaging.PrintGetPrintersCount()
cPrinter = "My Printer"
FOR nLoop = 1 TO nPrinters
cMatch = oImaging.PrintGetPrinterName(nLoop)
IF cMatch == cPrinter
oImaging.PrintSetActivePrinter(nLoop)
EXIT
ENDIF
NEXT nLoop
oImaging.PrintImageBySize(0,0,100,100)
