Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing a Rich Text document
Message
From
25/04/1997 10:55:52
 
 
To
22/04/1997 18:05:21
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brazil
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00028890
Message ID:
00029683
Views:
35
>>I am trying to print a Rich Text document from within Foxpro, as well as display the document. I started by using the RichText ActiveX Control, which displays the document with no problem. Now I want to print the document but I need the printer handle to do it using this control. Anybody know how to get a printer handle? Or...does anyone know of a better way to print an RTF within Foxpro?
>
>Hi Eugene,
>
>If you find out an answer to your question, please let me also know about it...
>We're facing the same challenge over here and the only way we had discovered to do that is using the RichText Control Method called "SelPrint" (but that's not enough for us here).
>
>Thanks,
>
>Renato.


We used write.exe in 'silent mode'. It's standard on W95 and if you RUN or winShellExecute with a "-p" (print) paramater and the file name wordpad will print in the background RTF documents. We have an app where the client constructs customer brochures. .e.g.
run /n2 write.exe ...[path]\edoc0001.rtf -p
A number of the standard utilities show their "C" roots by supporing -x switches.

You could also use winShellExecute from the win32api with the 'print' option and pass the file name. The file association should pick the appropriate utility and you get a return code if there is a problem rather than having a RUN command fail.
Hope this helps a little.
Gary
Gary
Helping Make Ideas Reality
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform