• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Converting .PDF To .Txt Files Using VBA

I've found the following code benath, but it keeps bugging out at line:

'Set jsObj = AcroXPDDoc.GetJSObject

Any ideas on what's causing this?


Sub Convert_PDF_To_Text_File()


Dim AcroXApp As Object

Dim AcroXAVDoc As Object

Dim AcroXPDDoc As Object


Set AcroXApp = CreateObject("AcroExch.App")

AcroXApp.Hide


Set AcroXAVDoc = CreateObject("AcroExch.AVDoc")

AcroXAVDoc.Open strPDFPath, "Acrobat"

AcroXAVDoc.BringToFront


Set AcroXPDDoc = AcroXAVDoc.GetPDDoc


Dim jsObj As Object

Set jsObj = AcroXPDDoc.GetJSObject


jsObj.SaveAs strOutputFile, "com.adobe.acrobat.plain-text"


AcroXAVDoc.Close False

AcroXApp.Exit


End Sub
 
Back
Top