* get default printer
lcDefaultPrinter = SET("PRINTER",3)
* use APRINTERS() to determine what printer you have.
IF APRINTERS(gaPrinters) > 0
* there is one installed
CREATE CURSOR myPrinters (Name C(60))
APPEND FROM ARRAY gaPrinters
BROW
ELSE
* No printer installed
MESSAGEBOX('No printers installed.')
ENDIF
* set the printer to a new printer
lcOutputPrinter = [from the cursor: myCursor]
SET PRINTER TO NAME (lcOutputPrinter)
* when done - reset default printer
SET PRINTER TO NAME (lcDefaultPrinter)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.