Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print a text document to the printer?
Message
From
24/11/1999 17:01:16
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00295257
Message ID:
00295338
Views:
19
>How do you print just a formated text document to the printer? It is not a report that needs a database to work, just instructions on how to use my program with the barcode reader. In frustration, I used the report form and had to link it to a database that I didn't need data from, just to make it work. However, it is a pain to type little segments in a label field and position them on the sheet and now I need more than 1 sheet, so I will have to setup a database with memo fields to make this work. There must be a better way! Any thoughts on how to do this?
>

You can copy a file to the printer using the CopyFile() API - there's a FAQ entry that covers the exact process (make sure to put a terminating formfeed character at the end of file to make sure the last page kicks out), or you can invoke Notepad to print a text file for you - try:

RUN /N NOTEPAD /P C:\AUTOEXEC.BAT
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
Reply
Map
View

Click here to load this message in the networking platform