VBA Code error with Adobe Acrobat 10 Type Library

Hi,
I have some code I created in Word VBA to combine several separate PDFs into a single PDF.  The code works fine with the Adobe Acrobat 9.0 Type Library and Adobe Reader 9.0 installed.
But, with the Adobe Acrobat 10 Type Library and Adobe Reader 10 installed, the code fails at the marked code below.  Any suggestions??
    Dim acrobatApp As Acrobat.acroApp
    Set acrobatApp = CreateObject("AcroExch.App")
    Dim mainPDF As Acrobat.AcroPDDoc
    Set mainPDF = CreateObject("AcroExch.PDDoc")  ****THIS IS WHERE THE CODE STOPS WITH A "TYPE MISMATCH" ERROR****
    Dim nextPage As Acrobat.AcroPDDoc
    Set nextPage = CreateObject("AcroExch.PDDoc")
    Dim numPages As Integer
    'Loop through all selected VLS, and add each one to the end of the main PDF
    For i = 0 To lstSelected.ListCount - 1
        mainPDF.Open CurDir & "\" & Replace(ThisDocument.Name, ".doc", "") & ".pdf"
        numPages = mainPDF.GetNumPages
        nextPage.Open lstSelected.List(i)
        If mainPDF.InsertPages(numPages - 1, nextPage, 0, nextPage.GetNumPages, True) = False Then
            MsgBox "Cannot insert pages"
        End If
        If mainPDF.Save(PDSaveFull, CurDir & "\" & Replace(ThisDocument.Name, ".doc", "") & ".pdf") = False Then
            MsgBox "Cannot save"
        End If
        'MsgBox lstSelected.List(i)
        nextPage.Close
    Next i

What if you start with a really simple VBA example? Take a look at this:
Private Sub CommandButton1_Click()
    Dim AcroApp As Acrobat.CAcroApp
    Dim theDocument As Acrobat.CAcroPDDoc
    Dim bm As Acrobat.AcroPDBookmark
    Dim thePath As String
    thePath = "c:\temp\test.pdf"
    Set AcroApp = CreateObject("AcroExch.App")
    Set theDocument = CreateObject("AcroExch.PDDoc")
    theDocument.Open (thePath)
    MsgBox "Number of pages: " & theDocument.GetNumPages
    theDocument.Close
    AcroApp.Exit
    Set AcroApp = Nothing
    Set theDocument = Nothing
    Set bm = Nothing
    MsgBox "Done"
End Sub
If this still does not work, I would reinstall Acrobat to make sure that
the TLB is not corrupt.
Karl Heinz Kremer
PDF Acrobatics Without a Net
[email protected]
http://www.khkonsulting.com

Similar Messages

  • Error with Adobe Acrobat X "error opening the document. The file is damaged and could not recover"

    Good morning,
    I have a problem when generating PDF files with Adobe Acrobat X.
    When I give print a Word document 2003 ... 2007 ... 2010 ... and select a network drive to save the PDF file, I get the following error "error opening the document. Thefile is damaged and not could recover."
    The file is saved on your drive well ... but I always get this error.
    Any ideas???
    Thank you.

    First of all thanks for responding.
    The installed version of Adobe's Adobe OS X and Windows XP machines is thelatest patch level.
    The local system .... works well ... Open Office 2010 ... create a new Word document and save it locally ... and all good.
    The problem is though that same machine ... it enters network (not Windows network. OES2 is a network with Novell network client) ... and to open and create a new document to WORD .... when printing the PDF printer ... select a network drive... and when the document is saved well ... but it shows the error.
    I have an amount of hours lost with this ... I hope you can help me find a solution.
    Thank you very much.

  • Error with Adobe Acrobat and video game

    I initially installed Adobe Acrobat on my macbook pro and now it won't allow me to open the program. Then, last night I attempted to install a video game and got the following error "sorry an error has occurred while launching the installer. (findFolder-36)" and I can't for the life of me figure out how to get these programs to work. Has anyone experienced the same type of problem? If so, how did you fix it
    Thanks a bunch!

    First of all thanks for responding.
    The installed version of Adobe's Adobe OS X and Windows XP machines is thelatest patch level.
    The local system .... works well ... Open Office 2010 ... create a new Word document and save it locally ... and all good.
    The problem is though that same machine ... it enters network (not Windows network. OES2 is a network with Novell network client) ... and to open and create a new document to WORD .... when printing the PDF printer ... select a network drive... and when the document is saved well ... but it shows the error.
    I have an amount of hours lost with this ... I hope you can help me find a solution.
    Thank you very much.

  • Thunderbird Email Attachment Error with Adobe Acrobat Reader DC

    I'm getting the above error when I click on email attachments to open them. This happened ever since I installed Adobe Acrobat Reader DC, whereas I had the regular Adobe Acrobat Reader prior to it.
    How do I make the DC version work with Thunderbird attachments?
    Thanks.

    Hi gmc0351,
    I am so sorry for the inconvenience caused & will try my best to get this issue resolved.
    It seems that there is some issue while downloading the PDF file from your Thunderbird. Are you experiencing this issue only with PDF files or other files also like MS office files?
    I will also recommend you to Quit Thunderbird & open it gain, then try sending a test mail to your own email address with PDF & MS office file attachments & once you receive the test mail try to download and open the files in the attachment & check if you are still experiencing the same issue or not.
    Regards,
    Aadesh

  • There is a problem with Adobe Acrobat Reader etc etc error code 103?? Help Please

    Adobe Acrobat Reader issue as above - downloaded latest version again still issues. I am using an old Acer laptop with Windows XP which I only now use for printing

    The  etc etc refers to the usual standard message as follows - also re Acrobat I was merely repeating the message given.
    'there is a problem with Adobe Acrobat Reader. If it is running exit and try again (103:103)' this was the exact message given. I had version 11.0.08 which I have now deleted and am using an earlier version 10.0.4 which seems to have resolved the problem for the time being

  • Problem with Acrobat type library 10 with VB6 on Win7 64bit

    I'm trying to use the Acrobat type library 10 in a visual basic 6 source code on my Windows 7 64bit.
    On the web I found many examples, and specifically i'm trying this one:
            'IAC objects
            Dim gAvDoc As Object
            Dim oPagesSrc As Long
            'variables
            bleFound = False
            ioutfile = FreeFile
            'hard coding for a PDF to open, it can be changed when needed.
            gPDFPath = "C:\Documents and Settings\....." ' FILL IN YOUR PATH HERE
            'Initialize Acrobat by creating App object
            Set gApp = CreateObject("AcroExch.App")
            gApp.Hide
            'Set PDDpc object
            Set gPDDoc = CreateObject("AcroExch.PDDoc")
    But running this code I always get an error message: "the component can't create object" for line:
                   Set gApp = CreateObject("AcroExch.App")
    Really I don't know how can I fix....
    Many thanks

    @M Marden:
    I will try your solution! But...
    @everybody
    ... is not so important 4 me now to use acrobat cause I've try fox.it reader activex and it works great with all my system!!! VB, 64bit... no problems at all.
    Easy to use, very fast and no help needed.
    Thanks bye

  • When I try to open a PDF downloaded from Adobe DC I get an error message:Adobe Acrobat Reader DC could not open 'nrneph.2015.33.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email

    When I try to download a PDF from Adobe DC, I get an error message: "Adobe Acrobat Reader DC could not open 'nrneph.2015.33.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)"
    I am using a Macbook Pro, OSX 10.9.5, Safari browser. Previous versions of Adobe Acrobat have worked fine for years.
    WGC

    What's the name of the file you are attempting to open?  Is it "ScreenFlow_4.5.2.dmg"?  If it is the correct name then the message is correct and you are attempting to open a file with DMG files extension and not one with a PDF file extension.  Adobe Reader opens PDF files an not any other file type.

  • Fatal error distributing forms with Adobe Acrobat 9 Pro

    Fatal error distributing forms with Adobe Acrobat 9 Pro.
    I click
    "Adobe Acrobat Pro/Formularer/Distribuer formularer/"
    ("Adobe Acrobat Pro/Forms/Distribute forms/")
    and chose a form for distribution and in the picture "Distribute Form" chose
    "Automatically download & organize responsees with Acrobat.com".
    I then click "Next" and write an email-address to send it to (i.g. to my own)
    and then click "Send".
    The program quickly writes
    "Authenticating email-addresses"
    and then gives the following error message
    "Borland Database er ikke installeret. Kan ikke indlæse tjenesteudbyder af Corel-adressekartotetek."
    ("Borland Database is not installed. Can not read load service provider of Corel address directory.")
    When I clik "OK" I get the error message
    "Adobe Acrobat has encountered a problem and needs to close. We are sorry for the inconvenience."
    I have undeleted and reinstalled Adobe Acrobat many times without any effect.
    The same procedure has been tried on another computer without any problem.
    What is my problem and how do I resolve it ?
    Operating System Windows XP
    Has worked may times before
    Same results with other files
    No recent system hardware or software change

    This is the image that I have plus....
    Reader 9.0 AcroRd32.exe caused Microsoft Visual C++ Runtime Library error
    Preinstalled Adobe 9 Standard doesn't work on a new Dell out of the box - why would it?
    Need help in creating a batch file that will add and remove some registy keys.
    %userprofile%

  • How do I deal with a Runtime Error on Adobe Acrobat 9.5?

    How do I deal with a Runtime Error on Adobe Acrobat 9.5? The instructions say to contact the support team but I have to pay in order to do so.

    What operating system and what is the statement of the error. Typically you would first run a repair on Acrobat from the help menu (or in Windows you can do that from the Control Panel>Add/Remove Programs).

  • How do you fix error message "There is a problem with Adobe Acrobat/Reader. (6:6)

    How does one fix error message "There is a problem with Adobe Acrobat/Reader.
    If it is running, please exit and try again. (6:6)

    http://www.essexinfo.net/queens-road-residents-association/assets/documents/village-voices is one example but a whole lot of the material which has been uploaded as pdf files over the last four years is now unviewable - if you click on the link you just get a black page.  The main site url is http://www.essexinfo.net and our site is the Queens Road Residents Association.  I have just gone through every link on the site and a number of links when clicked on will not bring up the material.  I tried going into Adobe 10 on my computer and disenabling protected mode as was suggested on your forum and at first when I went back into the essex info site it seemed to have worked when I clicked on a link that had only produced a black page.  However when I went back to test all the other links I found that the problem was still re-occuring.  This is really weird as the site and my connections to it which I sometimes make by directly accessing the site and sometime via a link from our QRRA blog have always worked perfectly with no problems up to now.  I downloaded adobe 10.1 on 8 March 2011.
    I contacted essexinfo separately but they said everything seemed to be OK at their end working from within the system.
    If you can help I would appreciate it.
    Pat

  • When i try to open docs in mail box  i get an error msg : there is a problem with adobe acrobat/read

    when i try to open docs in mail box  i get an error msg : "there is a problem with adobe acrobat/reader.  If it is running please exit and try again (1014:1014)"

    I have the same problem also but solved with the solution from http://www.brain-cluster.com/blog/orange/2011/03/06/there-problem-adobe-acrobatreader-if-it-running-please-exit-and-try-again

  • I get an error window that says There is a problem with adobe acrobat reader if it is running please exit and try again. Alittle help here PLEASE!!

    Can any one help me with this problem??

    Hi garryw,
    What version of Reader are you using, and are you on Mac OS or Windows? Do you get the same error when you try to print other PDF files, or is the problem specific to one PDF?
    For starters, please try the solutions listed in this thread: Re: There is a problem with Adobe Acrobat /Reader. If it is running ,please exit and try again.(0:104)
    Let us know how it goes.
    Best,
    Sara

  • Error: there is a problem with Adobe Acrobat/Reader   If it is running, please exit and try again.

    I keep getting this message when trying to open a file.
    Error: there is a problem with Adobe Acrobat/Reader   If it is running, please exit and try again.

    I have the same problem also but solved with the solution from http://www.brain-cluster.com/blog/orange/2011/03/06/there-problem-adobe-acrobatreader-if-it-running-please-exit-and-try-again

  • Error message: there is a problem with adobe acrobat reader. if it is running  please exit and try a

    error message: there is a problem with adobe acrobat reader. if it is running  please exit and try again (0:104) How can I fix this?

    Hi Claudio,  Thanks for your assistance.  I'm still confused.  When I click on this site it tells me: To view this FTP site in Windows Explorer, CLICK PAGE, and then click Open FTP Site in Windows Explorer.  I do not see "Page" on this list.  There is a "pace"... though.

  • Error Message With Adobe Acrobat Pro 9 Free Trial Version

    Hi,
    I know that this is a holiday weekend, but I need assistance with Adobe Acrobat 9 Free Trial Version.  I downloaded it, and then created a PDF file from MS Word 2007.  I tried to print, but the "save as" command popped up.  I had already saved it, so it already had a document name.  I tried resaving it and it would not do so.  Here's the error message that I received:
    "Adobe PDF cannot access the file because it is in use by another application process.  Verify that the file is not open by another application or process and try again.
    I did not have another app open.  Also, during this time, the software setup box kept popping up.  I kept selecting the 30 day trial version, but nothing would happen after I selected the button.  I am using the Vista OS on my computer.  I also have the Adobe Reader 9 which I have had for a while.
    I uninstalled and reinstalled the free version of Adobe Acrobat 9 and got the same result as described above.  If someone can help me with this, I would greatly appreciate it.  Thanks.
    Michelle Williams

    You have a problem. You cannot have Reader and Acrobat Pro on the same computer. It causes problems. Normally, I'd tell you to uninstall Reader and re-install Acrobat Pro, but doing so might make your trial fail and you cannot get two trials. For the moment when trying to create a pdf file, try printing to the the Adobe PDF virtual printer.

Maybe you are looking for

  • Oracle.jbo.domain.Date blows on NoSuchMethodError

    The following statement: oracle.jbo.domain.Date nowDate = new oracle.jbo.domain.Date(nowTime); has the following run time error when I try to run the main class in the production library: Exception in thread "main" java.lang.NoSuchMethodError at stkp

  • Designing help needed.

    Hi there. First of all i'm extremely sorry if i'm posting in wrong section. I'm using Windows XP x64 edition Photoshop CS3 Extended. I'm newbie in photoshop. Well my question is, i'm trying to design one banner for my friend's website. In that banner

  • Hiding files when left clicking on the dock

    From the "Dock", when I left click on "Preview" it shows the recent files I had viewed. How do I stop the files from showing up when I left click on "Preview"?

  • How to wrap up C++ Qt Creator project into ABS/AUR?

    Hi, Is there a more or less standard/streamlined procedure to create a deployable package from a Qt Creator project?

  • Why won't my game Pacific Fleet start?

    My son's Ipod and my iphone has the Pacific Fleet game and it will load but we can't get the game to start what's happening or NOT?