*------------------------------------------- *--Test code for testing ??? ejecting pages SET TALK OFF opt = '' RESTORE from c:\programnotes\av_mem additive && these are the printer codes used below maccount="8393827363465" ag_state="NC" SET CONSOLE OFF port = GETPRINTER() _pEject="NONE" SET PRINTER TO NAME (port) set PRINTER TO "testfile.txt" SET DEVICE TO PRINT SET PRINTER ON ??? opt ??? av_lpi8 ??? av_cpi12 ??? av_boldon ?? "MY TEST PREMIUM FINANCING CORPORATING, INC." AT 0 ??? av_boldoff ??? av_cndsprt ? "9999 Rikkiteyti Dr. P.O. Box 999999" ??? av_cpi12 ??? av_boldon ?? "ACCOUNT NO. "+RTRIM(ag_state)+' '+TRANS(maccount,"@B 99999999999999") AT 70 ??? av_boldoff ??? av_cndsprt ? "MyTown, South Carolina 23265-9999 Phone 800-555-1212" ? ? 'End of Test Only one page should print, NOT 2!' EJECT SET CONSOLE ON SET PRINTER OFF SET DEVICE TO SCREEN SET PRINTER TO SET TALK ON Set Classlib to RawPrint Additive oPrnDev = CreateObject("PrintDev") oPrnDev.cDocName = "Document from Files" oPrnDev.cPrinterName = set('printer', 3) If oPrnDev.oOPen() oPrnDev.cFilename = 'testfile.txt' oPrnDev.oPrintFile() oPrnDev.oClose() Else * Error opening device; display error number MessageBox("OpenPrinter() Error: "+str(oPrnDev.nOpenError)) Endif *-------------------------------------------