I'm trying to develop a variable data system in corel, to add invoice
numbers.. it's finished and working.. but, as it uses
document.printout() method, it creates new printjobs for each printed
invoice... so, if we are printing 100 invoices, we got 100 different
printjobs...
What I want is to create only one printjob with 100 pages into it.. I
found the class PrintOut which has method addDocument() .. but I can't
find the way to use it.... this is how I use it
*********************
Application.PrintJob.Clear()
For i = 1 to 10
[...]
Application.PrintJob.AddDocument ActiveDocument
[...]
next
Application.PrintJob.PrintOut()
**********************
This code results in "nothing to print" cause no page is really added
to printjob... I've added a second parameter to AddDocument... as page
range... tried with: "1", "1-1" and "1-0" ... each one show the same
error:
--
Run-time error '-2147467259 (80004005)':
Method 'AddDocument' of object 'IPrnVBAPrintJob' failed
--
As you can see... it's not very clear, why it's failing :'(
Does anyone know how to workaround this?
Thanx
Hernux