I have an MS Access database that I use to create invoices for our charity. For each member exactly one invoice should be exported as PDF. The file name is equal to the invoice number.
In March 2020 I used it for the first time and it worked without problems. Now I have version PDFCreator 4.0.2 and there are considerable problems with the output. File name and print job do not always match. I have outsourced the VBA script to a function. The path with file name and ID is passed.
Up to number 46 file name and PDF content are correct. At number 47 is the error. Filename is correct, but the content of number 46.
I have tried to find the error, but with each run it is always different numbers that are not correct. The number of wrong files is also different.
My guess was that the print job could not be read into the queue in time. If this happens, it starts again from the beginning - until Export = True. But that seems not to be the reason. He had this several times and still exported correctly.
Which also happens sometimes: when the function is called for a new file, that the initialization cannot take place because it is already initialized. It seems that the ReleaseCom did not work in the previous run.
Do you have an idea?
1 post - 1 participant