![]() |
|
|
|
|
|
|
3
19th October 17:58
External User
Posts: 1
|
Axel
I have an appliction that produces Purchase Orders, Invoices, etc. For each doucment type, I set up an MS-Word output file as a template ( see explanation below ). This template contains all the form data ( lines and boxes, fixed text, company logo, etc ). It also contains dummy text for each data field ( customer name, invoice number, item, quantity, price, etc.). My Clipper program uses the fopen() / fread() / fwrite() functions to create a copy of this template in which each dummy text field is replaced by the appropriate data ( or by blanks ). It then sends this copy to the printer one or more times. To create a template first create an MS-Word document then "print to file" from MS-Word using the Windows printer definition for the type of printer that will eventually be used. It is better to use a very old version of MS-Word ( e.g. Word'97 ). The printer files produced by newer versions of MS-Word are much larger, and take far too long to load. As an alternative one can use the MS-Word document itself as the template, create a copy with data fields replaced pass the copy to MS-Word by using the following command run ( "<path to MS-office>\WinWord.exe " + <copyname>.doc ) This will start up MS-Word, with the <copyname> open in it. The user can then print it, one or more times, from MS-Word. They can also fax it from MS-Word, by printing to a "print-to-fax" program such as WinFax. They can use MS-Word to make adjustments or annotations before printing or faxing. If this sounds like what you want to do and you need more technical detail you can reach me at joe.grant@sympatico.ca Joe |
|