Solved

Merge pdf

Posted on 2007-11-29
9
289 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
[X]
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
  • 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

726 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