Need a macro to convert pdf file into excel file

vigneshvicky

New Member
Joined
Oct 29, 2014
Messages
7
Hi all,
I am searching for a macro to convert the pdf file into excel file. i am having the code but shows some error on it.

Code:
Sub convertpdf2()
    Dim AcroXApp As Acrobat.AcroApp
    Dim AcroXAVDoc As Acrobat.AcroAVDoc
    Dim AcroXPDDoc As Acrobat.AcroPDDoc
    Dim Filename As String
    Dim jsObj As Object
    Dim NewFileName As String
    Filename = "C:\Documents and Settings\xxx\Desktop\file01.pdf"
    NewFileName = "U:\file.txt"
    Set AcroXApp = CreateObject("AcroExch.App")
    'AcroXApp.Show
    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

Is there any option to extract the file with certain criteria like name, age etc.... kindly do needful
 
Last edited by a moderator:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi,
I am facing error in this line Dim AcroXApp As Acrobat.AcroApp and i cant able to create a reference for the adobe file
 
Upvote 0
What did you set a reference to exactly? I think it needs to be Acrobat.tlb. By the way this is an Excel forum not an Adobe forum.
 
Upvote 0

Forum statistics

Threads
1,215,856
Messages
6,127,354
Members
449,381
Latest member
Aircuart

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top