December 11th, 2012, 12:23 PM
Variable Batch Printing
Hi, I cant find anyhting anywhere. I want to print an agreement between my club and a member at frequent intervals. I can make a Word template, I need to write a function which takes a template name, and a variant array of data, fills in the template, and prints it. My delphi code has all the data, and I want to do this on clicking a button.
Function Printcontract(Templatename,Stuff:variant array);
scan template for @Vn
replace with Stuff[n]
December 11th, 2012, 05:53 PM
I can't see the question in your post ...
Searching for the entrypoint, CreateOleObject('Word.Application'); would be the term for searching. On the other hand you might know this and be searching for alternatives, here I would Fast Reports.
December 14th, 2012, 08:17 AM
What I have done before is using rich text format for the template. It's easier to handle since you don't need fancy MS Word ActiveX. Put tags inside the template. In your code you need to find these tags and replace them with correct values. Then print it.