Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
STRTOFILE writes to file with printer name
Message
From
06/09/2001 09:06:31
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00552012
Message ID:
00553071
Views:
16
>Hi Patrick,
>
>PMFJI,
>I see you have other answers but the way I've done this (with simple text files) is:
type (lc_Source_File_Spec) to printer prompt
>hth,
>
>>have seen examples that indicated you could specify a printer name
>>in the STRTOFILE command and send a string to the specified printer.
>>
>>i tried the following, but instead of sending the output to the
>>selected printer, the output was sent to a file (in the current
>>directory). of course the filename is the name of the
>>printer that i specified.
>>
>>
>>lc_Printer_Name = ALLTRIM(GETPRINTER())
>>lc_File_Contents = FILETOSTR(lc_Source_File_Spec)
>>ln_Chars = STRTOFILE( lc_File_Contents , lc_Printer_Name , .T. )
>>
>>
>>how can i get it to go to the printer ?

Biiiilllllll !!!!

Thanks for jumping in. I've used VFP for a couple years, and didn't
know there was a TYPE command. And all the time, I was cussing the
FoxPro team for not providing a command to do such a oft-needed function.
Ha ! And I searched the help for 'displaying' a text file, 'printing'
a text file, etc. etc. But I didn't search for 'type' a file.

thanks again !!
patrick
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform