+ Reply to Thread
Results 1 to 9 of 9

PDF File Convert in Excel by the VBA coding

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    noida
    MS-Off Ver
    Excel 2007
    Posts
    12

    PDF File Convert in Excel by the VBA coding

    Hi,

    I want to convert PDF file into Excel file by the VBA coding.....

    Please help me it's very urgent for me.
    Hope to hear you soon

    Thank you

    Warm Regards,
    Rajdeep Singh

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: PDF File Convert in Excel by the VBA coding

    I suggest doing a quick google search.

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: PDF File Convert in Excel by the VBA coding

    You can't. You need to either copy and paste or use an external tool, having said that though most of them are not particularly successful

  4. #4
    Registered User
    Join Date
    06-22-2012
    Location
    noida
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: PDF File Convert in Excel by the VBA coding

    I already search by the google but that is not working.i use below mention VBA code.
    Sub ImportPDFFileData()
    'Author: Steve Lipsman
    'Purpose: Import PDF File Data Into Excel Worksheet
    'Other Requirement(s): 'Acrobat' Checked in VBA Tools-References
    'Reference Renames Itself 'Adobe Acrobat 9.0 Object Library' After Reference Is Saved
    'Declare Variable(s)
    Dim appAA As Acrobat.CAcroApp, docPDF As Acrobat.CAcroPDDoc
    Dim strFileName As String, intNOP As Integer, arrI As Variant
    Dim intC As Integer, intR As Integer, intBeg As Integer, intEnd As Integer
    'Initialize Variables
    Set appAA = CreateObject("AcroExch.App"): Set docPDF = CreateObject("AcroExch.PDDoc")
    'Set PDF FileName
    strFileName = "Your Full PDF File Pathname Here.pdf"
    'Read PDF File
    docPDF.Open (strFileName)
    'Extract Number of Pages From PDF File
    intNOP = docPDF.GetNumPages
    'Select First Data Cell
    Range("A1").Select
    'Open PDF File
    ActiveWorkbook.FollowHyperlink strFileName, , True
    'Loop Through All PDF File Pages
    For intC = 1 To intNOP
    'Go To Page Number
    SendKeys ("+^n" & intC & "{ENTER}")
    'Select All Data In The PDF File's Active Page
    SendKeys ("^a"), True
    'Right-Click Mouse
    SendKeys ("+{F10}"), True
    'Copy Data As Table
    SendKeys ("c"), True
    'Minimize Adobe Window
    SendKeys ("%n"), True
    'Paste Data In This Workbook's Worksheet
    ActiveSheet.Paste
    'Select Next Paste Cell
    Range("A" & Range("A1").SpecialCells(xlLastCell).Row + 2).Select
    'Maximize Adobe Window
    SendKeys ("%x")
    Next intC
    'Close Adobe File and Window
    SendKeys ("^w"), True
    'Empty Object Variables
    Set appAA = Nothing: Set docPDF = Nothing
    'Select First Cell
    Range("A1").Select
    End Sub

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: PDF File Convert in Excel by the VBA coding

    Please use code tags.

    That code requires Adobe Acrobat (not just the reader) installed - is it installed on your machine?

  6. #6
    Registered User
    Join Date
    06-22-2012
    Location
    noida
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: PDF File Convert in Excel by the VBA coding

    i am just installing the same...

  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: PDF File Convert in Excel by the VBA coding

    The same what?

  8. #8
    Registered User
    Join Date
    06-22-2012
    Location
    noida
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: PDF File Convert in Excel by the VBA coding

    Adobe Acrobat

  9. #9
    Registered User
    Join Date
    06-22-2012
    Location
    noida
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: PDF File Convert in Excel by the VBA coding

    Please find the attachment herewith.after install Adobe Acorbat. i am facing this error.
    Error.jpg

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1