I am trying to automatically open a pdf file in Lotus Notes. I used CreateObject("AcroRd32.application") and I receive the error message, "Cannot create automation object." AcroRd32.exe comes from the Tool Options. However, I did notice in the registry that the file is AcroExch.App. I'm spinning my wheels at this point! Can you help?
I have seen the AcroExch used rather than the AcroRd32. The example
below comes from the Experts Exchange Web site. The URL passed is the full URL to the document to be opened, either a HTTP, URL or filepath.
Sub PdfCheck(ByVal URL As String)
Dim AcroApp As Acrobat.CAcroApp
Dim PDDoc As Acrobat.CAcroPDDoc
Dim avDoc As Acrobat.CAcroAVDoc
AcroApp = CreateObject("AcroExch.App")
PDDoc = CreateObject("AcroExch.PDDoc")
If PDDoc.Open(URL) Then
avDoc = PDDoc.OpenAVDoc("")
MsgBox("Unable to open the
avDoc = Nothing
PDDoc = Nothing
AcroApp = Nothing
Do you have comments on this Ask the Expert question and response? Let us know.
This was first published in December 2004