From: gimme_this_gimme_that on
Hi,

In this code both statements:

Set a = New Acrobat.AcroAVDoc
Set a = CreateObject("AcroExch.AVDoc")

Fail.

I have the Adobe Acrobat 7.0 Library checked and AcroAVDoc shows up in
AutoComplete.

Is there some sort of rule that says some ActiveX objects can not be
instanciated?

Thanks.


Sub SearchPDF()
Dim a As Acrobat.CAcroAVDoc
Set a = New Acrobat.AcroAVDoc
Set a = CreateObject("AcroExch.AVDoc")
a.Open "C:\code\VBA-Transition_Guide.pdf", "szTempTitle"
Dim ln As Variant
ln = 1
b = a.FindText("VBA", ln, ln, ln) 'b is a boolean
MsgBox CStr(b)
a.Close (True)
End Sub