>>Hi,
>> Thank you.
>> I already use REPORT FORM myreport TO FILE mytext.txt ASCII to save my report in to TEXT FILE. Now, I need to print it out programmactically from this TEXT FILE without need to regenerate the report.
>>any idea>?
>
>This is adapted from the _1001 Things You Wanted to Know about Visual FoxPro_ book by Akins/Kramek/Shummer (see
www.hentzenwerke.com), which has become an indispensable reference on my desktop:
>
>DECLARE INTEGER ShellExecute IN Shell32.dll ;
> LONG HWnd, STRING cAction, STRING cFileName, STRING cParameters, ;
> STRING cPath, INTEGER nShowWindow
>
>RetVal = ShellExecute( 0, "Print", "C:\MyFile\File.txt", ;
> "", "", 0)
>
As long as print via the Windows GDI is what's wanted, this will work; if he needs to send the file as a stream to a device, especially containing control codes, he needs to use CopyFile() or David Frankenbach's approach of ??? FILETOSTR('c:\myfile\file.txt') to keep the GDI out of the loop.
>
>
> - della