vb.net - ActiveX cannot create object error when trying to convert PDF file to text file -


when try convert pdf file text file, encounter following error:

involving acrobat error 429 : activex cannot create object

my code is:

private sub commandbutton1_click()      dim acroxapp acrobat.acroapp     dim acroxavdoc acrobat.acroavdoc     dim acroxpddoc acrobat.acropddoc     dim filename string     dim jsobj object     dim newfilename string      filename = "c:\users\boominathan\desktop\test.pdf"      newfilename = "c:\file.txt"      set acroxapp = createobject("acroexch.app")      set acroxavdoc = createobject("acroexch.avdoc")      acroxavdoc.open filename, "acrobat"      set acroxpddoc = acroxavdoc.getpddoc      set jsobj = acroxpddoc.getjsobject      jsobj.saveas newfilename, "com.adobe.acrobat.plain-text"      acroxavdoc.close false      acroxapp.hide      acroxapp.exit  end sub 

and error in following line:

set acroxapp = createobject("acroexch.app") 

can please me resolve it?

that error seem indicate class name "acroexch.app" not registered on machine.

also, you've declared object of type acrobat.acroapp, need make mind class you're using, because think raise type 13 "mismatch" error if register acroexch.app class, because it's returning object type differs variable's declared type.

i'm not familiar object models try:

set acroxapp = createobject("acrobat.acroapp")  set acroxavdoc = createobject("acrobat.acroavdoc") 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -