We receive orders for up to 10 years later. The orders come in through an on-line system, are saved as PDF files, and registered in the database. But won't be printed.
There's a weekly schedule to print the orders up to 3 months later. FE opens a recordset of the orders, loops through it and prints:
1- A report that contains all the necessary processes and steps for manufacturing the part,
2- The order sheet (saved pdf file)
3- And then the drawings.
Let's say the record count is 300. We expect to have 300 sets of 3 layer of papers: 1)Printed report (Access report), 2)Order sheet(Pdf) 3)its drawing(PDF).
But it will never happen this way. VBA is running too fast. Windows and printer are left behind. The printed result is a mess and mixed. We have to waste a lot of time to separate the mixed pile of papers. VBA loops through the recordset and sends the print job one after the other, but windows has to open the pdf files, print it and close it. It takes a while and VBA is sending the jobs continuously. Printer's queue list is filled and to our surprise, Windows or Printer doesn't print jobs with the order they've been added. It seems that printer picks the pending job randomly.
now my questions:
1- Is there any way to recognize if a print job is finished or not to send the next job? We need to keep the order of printed documents just the same as the recordset we've opened.
Our printers are capable of printing 40 pages per minute. We thought of adding a sleep time after sending each print job, but the result was not enough.
2-Is there any way to force Windows or Printer , print jobs in the order they've been added to the print queue?
Any other idea to sort this problem is much appreciated.
thanks.
There's a weekly schedule to print the orders up to 3 months later. FE opens a recordset of the orders, loops through it and prints:
1- A report that contains all the necessary processes and steps for manufacturing the part,
2- The order sheet (saved pdf file)
3- And then the drawings.
Let's say the record count is 300. We expect to have 300 sets of 3 layer of papers: 1)Printed report (Access report), 2)Order sheet(Pdf) 3)its drawing(PDF).
But it will never happen this way. VBA is running too fast. Windows and printer are left behind. The printed result is a mess and mixed. We have to waste a lot of time to separate the mixed pile of papers. VBA loops through the recordset and sends the print job one after the other, but windows has to open the pdf files, print it and close it. It takes a while and VBA is sending the jobs continuously. Printer's queue list is filled and to our surprise, Windows or Printer doesn't print jobs with the order they've been added. It seems that printer picks the pending job randomly.
now my questions:
1- Is there any way to recognize if a print job is finished or not to send the next job? We need to keep the order of printed documents just the same as the recordset we've opened.
Our printers are capable of printing 40 pages per minute. We thought of adding a sleep time after sending each print job, but the result was not enough.
2-Is there any way to force Windows or Printer , print jobs in the order they've been added to the print queue?
Any other idea to sort this problem is much appreciated.
thanks.
Last edited: