The following code works fine when I save as a text file but gives me NotAllowedError when I try Excel (I didn't find an ID for Word which is what I really want)
Sub convertpdf2()
Dim AcroXApp As Acrobat.AcroApp, AcroXAVDoc As Acrobat.AcroAVDoc, AcroXPDDoc As Acrobat.AcroPDDoc
Dim jsObj As Object
Dim FileIn$, FileOut$
Const xlTextWindows = 20
FileIn = "E:\working\access\seminole\Backup\test.pdf"
FileOut = "E:\working\access\TX\Lubbock\Lubbock\semfile.xls"
Set AcroXApp = CreateObject("AcroExch.App")
AcroXApp.Show
Set AcroXAVDoc = CreateObject("AcroExch.AVDoc")
AcroXAVDoc.Open FileIn, "Lubbock"
Set AcroXPDDoc = AcroXAVDoc.GetPDDoc
Set jsObj = AcroXPDDoc.GetJSObject
' jsObj.SaveAs FileOut, "com.adobe.acrobat.plain-text"
jsObj.SaveAs FileOut, "com.adobe.acrobat.spreadsheet"
AcroXAVDoc.Close False
AcroXApp.Hide
AcroXApp.Exit
End Sub
I read than I need to create a js file in some folder. After creating that file, how do I invoke it?
Thanks