>DECLARE OpenPrinter IN Winspool.drv; > STRING pPrinterName, INTEGER @lphandle,; > STRING @lpDefault >DECLARE EnumJobs IN Winspool.drv; > INTEGER hPrinter, INTEGER FirstJob,; > INTEGER NoJobs, INTEGER level,; > STRING @pinfo, INTEGER lSize,; > INTEGER @pcbNeeded, INTEGER @pcReturned >DECLARE ClosePrinter IN Winspool.drv; > INTEGER hPrinter >* lcprinter is the same value as the first column >* from APRINTERS() >lnhandle = 0 >llresult = OpenPrinter(lcprinter, @lnhandle, 0) >IF llresult > * Replace the 999999 with the maximum number of values > lcstruct = SPACE(8 * 999999) > lnsize = LEN(lcstruct) > STORE 0 TO lnNeeded, lnReturned > * The 999999 should contain the number of values also > llresult = EnumJobs(lnhandle, 0, 999999, 1, @lcstruct,; > lnsize, @lnneeded , @lnreturned) > IF llresult > * lnreturned has the number of jobs > ENDIF > = ClosePrinter(lnhandle) >ENDIF>If the value is too big, things will take long enough so all the jobs are run *g* Sorry about the typos.