i want to convert the pdf output of an access report into images.
i call the ConvertPDFToImage() function by this command:
strPDFPath = "D:\Report.pdf"
strImagePath = "D:\ReportImage.jpg"
Call ConvertPDFToImage(strPDFPath, strImagePath)
and ConvertPDFToImage() is here:
Sub ConvertPDFToImage(pdfPath, imagePath As String)
Dim AcroApp As Acrobat.CAcroApp
Dim acroDoc As Acrobat.CAcroPDDoc
Dim AcroAVDoc As Acrobat.AcroAVDoc
Dim AcroPDDoc As Acrobat.AcroPDDoc
Set AcroApp = CreateObject("AcroExch.App")
Set acroDoc = CreateObject("AcroExch.PDDoc")
Set AcroAVDoc = CreateObject("AcroExch.AVDoc")
If AcroAVDoc.Open(pdfPath, vbNull) <> True Then
Exit Sub
End If
Set AcroAVDoc = AcroApp.GetActiveDoc
Set AcroPDDoc = AcroAVDoc.GetPDDoc
AcroApp.MenuItemExecute "File.ExportAsImage"
AcroApp.CloseAllDocs
AcroApp.Exit
Set AcroApp = Nothing
Set AcroAVDoc = Nothing
Set AcroPDDoc = Nothing
End sub
but AcroApp.MenuItemExecute "File.ExportAsImage" cannot accept the saved directory of images and names.
do you have any ways to solve this?