Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Merge pdf

Posted on 2007-11-29
9
285 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
ID: 20375907
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
ID: 20376228
rick i tried it i get the same error message
0
 
LVL 16

Expert Comment

by:Rick_Rickards
ID: 20376329
On which line does it crash?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:wwstudioinc
ID: 20376578
AcroExchApp = CreateObject("AcroExch.App")
0
 
LVL 16

Expert Comment

by:Rick_Rickards
ID: 20378183
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
ID: 20378287
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
ID: 20378685
any links to where i can obtain the dll
0
 
LVL 16

Expert Comment

by:Rick_Rickards
ID: 20378779
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
ID: 31411737
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

792 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