PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com
_____________________________________________________________
Thanks a lot.
I am using JSObject to call the print function (using Acrobat 5). Could
you please take a look at the following code? Any problem, or any
suggestions? The code was written by EXCEL VBA.
Private Sub cmdPrint_Click()
Dim gApp As Acrobat.CAcroApp
Dim gPDDoc As Acrobat.CAcroPDDoc
Dim jso As Object
Dim jso2 as object
'Connect to the Acrobat Application
Set gApp = CreateObject("AcroExch.App")
Set gPDDoc = CreateObject("AcroExch.PDDoc")
If gPDDoc.Open("C:\test.pdf") Then
Set jso = gPDDoc.GetJSObject
'***** THIS ONE WON'T WORK, SHOW "COMPILE ERROR:
EXPECTED:)"****
jso.print(False, 0, 2)
'**** IF I USE THIS ONE, THE DOCUMENT WILL PRINT, BUT SHOW
"Run-time error '424' Object
required" AFTER.****
Set jso2 = jso.print(False, 0, 2)
End If
End Sub
Does the JSObject Print will return some value? How can the first print
won't work? I am new for the Acrobat Development, really appreciate your
help.
Feng
Pre-production
Dynamic Windows & Doors Inc.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Leonard Rosenthol
Sent: July 10, 2003 5:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [PDFdev] Bookmark Pagenumber & Print Function
PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com
_____________________________________________________________
At 3:20 PM -0700 7/10/03, Feng Yang wrote:
>So is that possible I use VBA or VB to
>call the print function, and automate the process.
Sure, you can either use the COM printing functions OR the
JSObject printing functions. In Acrobat 5, both are equivalent. In
Acrobat 6, you can now do MUCH more with the JSObject...
Leonard
--
------------------------------------------------------------------------
---
Leonard Rosenthol
<mailto:[EMAIL PROTECTED]>
Chief Technical Officer <http://www.pdfsages.com>
PDF Sages, Inc. 215-629-3700 (voice)
215-629-0789 (fax)
To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfdev.html
To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfdev.html