This is working but getting error
 
*Run-time error '429': ActiveX component can't create object VBA*
 
Please help

On Thursday, July 19, 2012 9:40:25 PM UTC+5:30, NOORAIN ANSARI wrote:

> Hi Caasi,
>
> Check out this article 
> http://www.linkedin.com/groups/How-Import-PDF
> -File-Data-1871310.S.74131482?trk=group_search_item_list-0-b-ttl&goback=%2Egna_1871310
>  
>
> 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 Thu, Jul 19, 2012 at 7:08 PM, caasi <isaacem...@gmail.com <javascript:>
> > wrote:
>
>> Hi Ayush Jain,
>>
>> I have a question. I have lot of pdf files to be converted to Excel . 
>> However , the pdf to excel converter converts only  max 2 -5 pages . My 
>> question is  can we use a macro to convert pdf to excel. please advise 
>> please its very urgent ..
>>
>> Thanks ,
>>
>> Isaac.
>>
>> On Sunday, February 20, 2011 4:22:14 AM UTC-5, Ayush Jain wrote:
>>>
>>> Hi Shrinivas,
>>>
>>> In excel 2007 version and onwards, We already have functionality to save 
>>> excel in PDF format. So we do not need a VBA for Excel to PDF.
>>> While saving excel workbook , Just select the .pdf in 'Save as Type' and 
>>> this will generate a PDF format file for you.
>>>
>>> Let me know if you have more questions.
>>>
>>> Regards
>>> Ayush Jain
>>> Group Manager.
>>
>>  -- 
>> -- 
>> 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-...@googlegroups.com 
>> <javascript:>
>>  
>> To unsubscribe, send a blank email to excel-macros...@googlegroups.com 
>> <javascript:>
>>  
>>  
>>
>
>
>
> -- 
> Thanks & regards,
> Noorain Ansari
> www.noorainansari.com
> www.excelvbaclinic.blogspot.com
>  
>
>
>
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

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) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to