Set Proc To DIRPRTCLASS.PRG Additive oDirPrt = Createobj('DirectPrintOutput') With oDirPrt .PrinterOpen("My Windows Printer's name") && Arg can be a Win Printer name, port, or a print queue - works with both MSNetwork If .PrinterIsOpen() .DocOpen('MySpoolName') .DocWrite(m.myPrintString) .SpoolFile('MySpoolFile.TMP', .T.) && Spool file and delete after printed .DocClose() .PrinterClose() && close both current job and the printerIf you direct print to a com or lpt use this:
Declare Integer CopyFile In kernel32; STRING lpSrcFile, String lpDstFile, Integer bFail CopyFile(m.myFileName,"lpt1", 0)