Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print text file programmatically?
Message
From
20/10/2000 22:37:07
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00432017
Message ID:
00432398
Views:
23
>>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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform