*------------------------------------------------------- * Procedure...: CallRawPrint * * Author......: Rick Borup * * Abstract....: Use RAWPRINT5.FLL to print an ASCII file directly to the printer. * * Parameters..: tcFileName - the name of the ASCII file to print * PROCEDURE CallRawPrint(tcFileName) if type("tcFileName") != "C" MESSAGEBOX("Report cannot be printed because the print " + ; "file name is missing or invalid.", ; MB_ICONEXCLAMATION,"Error") RETURN endif local lcPrinterName lcPrinterName = GetPrinter() IF EMPTY(lcPrinterName) RETURN ENDIF set printer to name "&lcPrinterName" set library to rawprint5.fll additive if !rawprint(lcPrinterName, tcFileName) * If RawPrint returned .F. then there was an error. MESSAGEBOX("There was an error attempting to print report " + ; upper(alltrim(tcFileName)), ; MB_ICONEXCLAMATION, "Error") endif release library rawprint5.fll RETURN ENDPROC && CallRawPrint()