With AcroPDF1
.LoadFile "C:\test.pdf"
.setCurrentPage 3
End With
which gives me "Runtime Error 424, Object Required," and I've tried:
Dim AcroPDDoc As Object
Set AcroPDDoc = CreateObject("AcroExch.PDDoc")
Set pdDoc = CreateObject("AcroExch.PDDoc")
which gives me "Runtime error 429, Activex component can't create object."
I've made sure all References to anything Adobe or Acrobat are checked off (I'm programming in MS Access using VB).
What am I missing?
Thanks.
(PS I do own Acrobat Standard that I use on my office machine and I can't get the code to work there either. But I need to be able to use Reader for the project I'm working on.)
I've poured over it, but bottom line is I keep getting "Runtime error 429, ActiveX component can't create object" when I try to create any object.
I'm using Adobe Reader.
I believe most of the IAC Reference you suggest applies only to acrobat, not to Adobe Reader.
The only OLE Auto method that I think should work with Adobe Reader is crobat AxAcroPDFLib.AxAcroPDF but I CANNOT find the syntax as to how to create an object with it.
How do I create an object to open Adobe Reader (not Acrobat)? What's the syntax?
Example 2.3 in "Developing Applications using Interapplication
Communication" in the Acrobat 8.1 SDK seems to cover this.
Aandi Inston
I have read through the "Developing Applications..." in the SDK and several other publications, but it's still not working.
I even tried upgrading from Adobe Reader 8.1 to 9.
(The version of Microsoft Visual Basic I'm using is 6.0 with MS Access 2000.)
When I simply cut and paste from Example 2.3, the following commands are not recognized:
Friend WithEvents AxAcroPDF1 As AxAcroPDFLib.AxAcroPDF
Me.AxAcroPDF1.Location = New System.Drawing.Point(24, 40)
Me.AxAcroPDF1.Size = New System.Drawing.Size(584, 600)
MORE OVER, when I simply cut and paste all of Example 2.1, which should be fine, I AGAIN get ...Runtime Error 429, ActiveX component can't create object" at the very first line:
Set app = CreateObject("AcroExch.App")
That should tell us there's something wrong that has less to do with syntax and more to do with something basic.
What could that be?
Example 2.1 requires an installation of Adobe Acrobat.
That's true. Do I have to use .NET to programatically open a PDF and skip to different pages? No way in VB6? That would seem strange...
You mean I'm not using .NET yet?
You don't need .NET.
Brother, what do I need?
And is it clear that I'm trying to open up an instance of Adobe Reader outside of my database (not inside a form within the database)?
Not at all clear, and if you want to do that, why are you using
AxAcroPDF - this is a browser control, designed to display within a
form. It does not open a separate Reader window.
Aandi Inston
How would I open an instance of Adobe Reader outside my database? (and then go to different pages)?
You can start Reader via the Windows API (not OLE).
> (and then go to different pages)?
There is a DDE interface, not sure if it offers this facility. You
might have reached beyond the limits of what is available in the free
Reader.
Aandi Inston
Maybee this message will be obsolete, but ...
I'm actually trying to manipulate PDF files into my program using the API commands.
I embedeed into my project the ActiveX (acropdf.dll). I open my document and set it to a specific page using the various command of the API.
Actually, I tried to find the documentation for all the functions of the API but didn't succeed into my quest. If you have any informations, It will be very appreciated.
If you are still looking for info, come back to me.
Laurent Richelle
I have a similar problem, but I am not so familiar with VB or javascript or the Windows API, so I would appreciate explicit examples.
I would like to make a .bat script (yes, DOS, under Win XP) to open a .pdf document using Acrobat Reader (v. 8.1.0 in my case). If the document is already open, I would like to close it and reopen it.
Today, I do this with
"C:\Program Files\Adobe\Reader 8.1\Reader\AcroRd32.exe" test.pdf
which works. However, it also locks the file for editing. I therefore need a way (from the command line) to either close test.pdf or open it read-only.
I realize that this (at least closing the document) should be accessible via Adobe Reader API or Acrobat IAC, possibly through the javascript command app.openDoc() (I have looked into the documents mentioned above), but I have no clue about how to do this from the command line. Anyone care to help me out with an example?
Anders Hägglund