Error: ActiveX component can't create object 429 - trying to use Adobe for combine pdf

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875

Hi, 'm getting error in the U line.
what 'm trying to achieve here is to combine 2 pdf files into 1.
I have referenced to adobe acrobat 10.x type lib...
please help.

thanks.

Code:
Sub test5()[/FONT][FONT=courier new]'adobe Acrobat 10# type lib[/FONT]
[FONT=courier new]On Error GoTo errhnfler[/FONT]
[FONT=courier new]Dim AcroApp As Acrobat.CAcroApp[/FONT]
[FONT=courier new]    [/FONT]
[FONT=courier new]    Dim Part1Document As Acrobat.CAcroPDDoc[/FONT]
[FONT=courier new]    Dim Part2Document As Acrobat.CAcroPDDoc[/FONT]
[FONT=courier new]    [/FONT]
[FONT=courier new]    Dim numPages As Integer[/FONT]
[FONT=courier new]    [/FONT]
[U][FONT=courier new]    Set AcroApp = CreateObject("AcroExch.App")[/FONT][/U]
[FONT=courier new]    [/FONT]
[FONT=courier new]    Set Part1Document = CreateObject("AcroExch.PDDoc")[/FONT]
[FONT=courier new]    Set Part2Document = CreateObject("AcroExch.PDDoc")[/FONT]
[FONT=courier new]     [/FONT]
[FONT=courier new]    Part1Document.Open ("C:\rpt1CasesByWHContact.pdf")[/FONT]
[FONT=courier new]    Part2Document.Open ("C:\rpt2CasesByClientContact.pdf")[/FONT]
[FONT=courier new]    [/FONT]
[FONT=courier new]    ' Insert the pages of Part2 after the end of Part1[/FONT]
[FONT=courier new]    numPages = Part1Document.GetNumPages()[/FONT]
[FONT=courier new]    [/FONT]
[FONT=courier new]    If Part1Document.InsertPages(numPages - 1, Part2Document, 0, Part2Document.GetNumPages(), True) = False Then[/FONT]
[FONT=courier new]        MsgBox "Cannot insert pages"[/FONT]
[FONT=courier new]    End If[/FONT]
[FONT=courier new]     [/FONT]
[FONT=courier new]    If Part1Document.Save(PDSaveFull, "C:\MergedFile.pdf") = False Then[/FONT]
[FONT=courier new]        MsgBox "Cannot save the modified document"[/FONT]
[FONT=courier new]    End If[/FONT]
[FONT=courier new]        [/FONT]
[FONT=courier new]    Part1Document.Close[/FONT]
[FONT=courier new]    Part2Document.Close[/FONT]
[FONT=courier new]     [/FONT]
[FONT=courier new]    AcroApp.Exit[/FONT]
[FONT=courier new]    Set AcroApp = Nothing[/FONT]
[FONT=courier new]    Set Part1Document = Nothing[/FONT]
[FONT=courier new]    Set Part2Document = Nothing[/FONT]
[FONT=courier new]     [/FONT]
[FONT=courier new]    MsgBox "Done"[/FONT]
[FONT=courier new]    [/FONT]
[FONT=courier new]    End[/FONT]
[FONT=courier new]errhnfler:[/FONT]
[FONT=courier new]    Debug.Print Err.Description & " " & Err.Number[/FONT]
[FONT=courier new]End Sub[/FONT]
[FONT=courier new]
[/FONT]
[FONT=courier new]
 
I really dont know. i think it is Adobe Acrobat Professional Full Version or something....
I reference it to Acrobat and it worked perfect.
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Pedie

Note the references on the work computer, then compare them to the references on your home computer.


If you find anything associated with Acrobat that isn't on your home computer you could try Googling it to find out which application it belongs to.
 
Upvote 0

Forum statistics

Threads
1,215,161
Messages
6,123,371
Members
449,097
Latest member
thnirmitha

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