View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] gimme_this_gimme_that@yahoo.com[_2_] is offline
external usenet poster
 
Posts: 236
Default Can't create an Object (Some sort of ActiveX thing?)

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