Solved

Merge pdf

Posted on 2007-11-29
9
270 Views
Last Modified: 2010-04-21
i am trying to use the code found at http://www.experts-exchange.com/Web_Development/Document_Imaging/Adobe_Acrobat/Q_21000173.html.the problem i am having is at the createobject line i have set the references to Adobe Acrobat 8.0 Type Library
Dim AcroExchApp As Acrobat.CAcroApp
        Dim AcroExchPDDoc As Acrobat.CAcroPDDoc

        Dim AcroExchInsertPDDoc As Acrobat.CAcroPDDoc
        Dim strFileName As String, strPath As String
        Dim iNumberOfPagesToInsert As Integer
        Dim iLastPage As Integer

        AcroExchApp = CreateObject("AcroExch.App")
        AcroExchPDDoc = CreateObject("AcroExch.PDDoc")

the error message i keep getting is
ActiveX component can't create object
i need help
0
Comment
Question by:wwstudioinc
  • 5
  • 4
9 Comments
 
LVL 16

Accepted Solution

by:
Rick_Rickards earned 500 total points
Comment Utility
Just a guess but sometimes declaring the object variable specifically causes issues and by using the more generic "object" declaration will get things working.  Sample code below...

Note: In this case I changed all 3 to object but it may be that only 1 or 2 need be changed assuming this turns out to be the fix.
        Dim AcroExchApp As Object

        Dim AcroExchPDDoc As Object
 

        Dim AcroExchInsertPDDoc As Object

        Dim strFileName As String, strPath As String

        Dim iNumberOfPagesToInsert As Integer

        Dim iLastPage As Integer
 

        AcroExchApp = CreateObject("AcroExch.App")

        AcroExchPDDoc = CreateObject("AcroExch.PDDoc")

Open in new window

0
 

Author Comment

by:wwstudioinc
Comment Utility
rick i tried it i get the same error message
0
 
LVL 16

Expert Comment

by:Rick_Rickards
Comment Utility
On which line does it crash?
0
 

Author Comment

by:wwstudioinc
Comment Utility
AcroExchApp = CreateObject("AcroExch.App")
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 16

Expert Comment

by:Rick_Rickards
Comment Utility
Do you have Adobe Acrobat 6.0 version installed?  If so, is it the Read Only version or can is it a version that can read and write .pdf files?

It almost sounds as if the Acrobat Reader .dll hasn't couldn't be found within the registry, either because something went arry during the installation or because it was never installed.
0
 

Author Comment

by:wwstudioinc
Comment Utility
i had a reference to Adobe Acrobat 8.0 Type Library on another computer and it still failed.i am going to locate the dll
0
 

Author Comment

by:wwstudioinc
Comment Utility
any links to where i can obtain the dll
0
 
LVL 16

Expert Comment

by:Rick_Rickards
Comment Utility
To the best of my knowledge versions of Adobe Acrobat 8.0 that come complete with the Type Library are purchased not downloaded for free.  While I'm not entirely sure I don't believe the reader which can be downloaded for free comes with the type library.  To be honest, however, I'm not 100% certain.  

If you can find the .dll and one is all you need and it is self registering it then you can get it to load the registry up with what it needs by going to DOS, change to the folder where the dll is located and then type....

RegSvr32 MyLib.dll

That said, I'd be reluctant to make any claims that simply finding the 1 dll you know you're missing would be the only thing required.  As I said before, it sounds as if the product is not installed and hence it can not be instantiated.
0
 

Author Closing Comment

by:wwstudioinc
Comment Utility
Rick i found an old version of adodbe 5.0 i installed it and everything is fine i guess it had to do with the version that i had installed.thanjs
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe INTRODUCTION This Article is a follow-up to the Article entitled How To Rename-Move a Batch of PDF Files Based o…
*Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now