* Spooler API declarations DECLARE OpenPrinter IN Winspool.drv; STRING @pPrinterName,; INTEGER @phPrinter, STRING @pDefault DECLARE GetJob IN Winspool.drv; INTEGER hPrinter, INTEGER JobId,; INTEGER Level, STRING @pJob,; INTEGER cbBuf, INTEGER @pcbNeeded DECLARE ClosePrinter IN Winspool.drv; INTEGER hPrinter * Structure definintions *typedef struct _JOB_INFO_1 { * DWORD JobId; * LPTSTR pPrinterName; * LPTSTR pMachineName; * LPTSTR pUserName; * LPTSTR pDocument; * LPTSTR pDatatype; * LPTSTR pStatus; * DWORD Status; * DWORD Priority; * DWORD Position; * DWORD TotalPages; * DWORD PagesPrinted; * SYSTEMTIME Submitted; *} JOB_INFO_1; *typedef struct _SYSTEMTIME { * WORD wYear; * WORD wMonth; * WORD wDayOfWeek; * WORD wDay; * WORD wHour; * WORD wMinute; * WORD wSecond; * WORD wMilliseconds; *} SYSTEMTIME; * Define a SYSTEMTIME structure lcsystime = REPLICATE(CHR(0), 16) * Define a JOB_INFO_1 structure lcjobinfo = REPLICATE(CHR(0), 48) + lcsystime lninfosize = LEN(lcjobinfo) * Get the printer handle * lcprinter is the name of the printer. * Can be obtained from one of those printers * listed in the first column of the array * returned by APRINTERS() STORE 0 TO lnhandle, lnbytes * If the function succeeds llresult = .T. * lnhandle will contain a handle to the printer * object llresult = OpenPrinter(@lcprinter, @lnhandle, 0) IF llresult * Call GetJob * lnJobID is the ID * lnbytes will contain the number of bytes returned in the structure llresult = GetJob(lnhandle, lnJobID, 1, @lcjobinfo, lninfosize, @lnbytes) IF llresult * Bytes 45-48 will contain the number printed * Bytes 41-44 will contain the number submitted * Both in lo to hi byte format ENDIF = ClosePrinter(lnhandle) ENDIFI'd be interested in learning the results, either by post or email.