New Forum | Previous | Next | (P-PDF) Developers
Topic: VB batch print problem
Conf: (P-PDF) Developers, Msg: 59720
Date: 5/29/2002 05:40 PM
I have a Visual Basic 6 program that deals with PDF documents. It has a print option and allows the user to select multiple documents to send to the printer. When the user click on the print button it calls a small C++ DDE program that gets the acrobat handle and opens and prints the document. The program is called for each document that has been selected. VB's shell command (for calling other apps, such as my DDEPRINT) is asyncronous, so I wrote a function that gets a process ID and loops until it is complete.
The print batch works on Windows98, but when it is ran on WinNT, the process ID is reported as being completed right after the printer options dialog comes up in Acrobat. My program then tries to close the documents and print the next one in the list, before the user has clicked on the OK button in the print dialog. This causes a DDE error. Does anyone have any ideas on a workaround for this problem?
Thank you very much,