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
Code:
for x = 1 to ...
    AcroPDF1.LoadFile FileList(x)
    AcroPDF1.PrintAll
next
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.

Attempt 2. Using ShellExecute
Code:
            Call ShellExecute(hWnd, "Print", PDFFile, "", "", 0)
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?)


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?