hi, thanks but its showing error in line Dim appAA As Acrobat.CAcroApp "user defined type not defined" alert is comming whn this program is run
with regards raghu On Sun, Jan 22, 2012 at 9:52 PM, NOORAIN ANSARI <noorain.ans...@gmail.com>wrote: > Dear Kaushik, > > Please use below code, hope it will help to you.. > > > 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 > > On Sun, Jan 22, 2012 at 8:32 PM, KAUSHIK SAVLA > <savla.kaus...@gmail.com>wrote: > >> That code not working too. >> >> Pls suggest. >> >> Regards, >> Kaushik Savla >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to excel-macros@googlegroups.com >> > > > > -- > Thanks & regards, > Noorain Ansari > *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> > *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/> > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com