Hi All,
Been having nightmares with this one so any help would be greatly appreciated.
Using VB6 I am trying to print multiple existing PDF files to the default printer ideally as a silent background process.
Attempt 1. Using the Adobe ActiveX control
The above fails completely because there is no way of knowing when the load or the print has completed so I cannot reuse the control again in the loop and also I can't close the form containing the control before printing has completed.Code:for x = 1 to ... AcroPDF1.LoadFile FileList(x) AcroPDF1.PrintAll next
Attempt 2. Using ShellExecute
The above is better but this leaves open a blank Adobe viewer window and also works as a background process so I cannot delete the PDF files until I know the print has completed (how?)Code:Call ShellExecute(hWnd, "Print", PDFFile, "", "", 0)
Ideally what I need is a simple function which will print a specified PDF file and wait until printing has completed (entire document has been spooled).
This should be so simple?




Reply With Quote