I'm always trying to converter my vb6 application to use Acrobat Elements instead of Acrobat 5.0. Solved the print problem using Adobe PDF virtual printer (setting path and name of the PDF file) now I have the problem of printing on paper the PDF files created. In the application I was using this code to do that:
Dim nbr_pages As Long
Dim gApp As Acrobat.CAcroApp
Dim gPDDoc As Acrobat.CAcroPDDoc
Dim gAVDoc As Acrobat.CAcroAVDoc
On Error GoTo StampaFileError
Set gApp = CreateObject("AcroExch.App")
Set gAVDoc = CreateObject("AcroExch.AVDoc")
gApp.Hide
gAVDoc.Open sFile, ""
Set gPDDoc = gAVDoc.GetPDDoc
nbr_pages = gPDDoc.GetNumPages - 1
Call gAVDoc.PrintPages(0, nbr_pages, 2, True, True)
gApp.Exit
gAVDoc.Close True
gPDDoc.Close
Set gApp = Nothing
Set gPDDoc = Nothing
Set gAVDoc = Nothing
Now width Elements this code fails probably because Elements does not have a COM interface, how can I solve my problem?
I've tryed to use ShellExecute width "Print" command but seems to print only the first PDF and also leave Acrobat Reader open.