Developer Knowledgebase
Knowledgebase Home
Acrobat KB
Overview
Software Development Kits
Developer Knowledgebase
Support
Legal Notices
Feedback
Adobe Solution Partner Program
Join
Find a Solution Partner
Product
Acrobat
Version
5.0, 5.05, 6.0
Last Edited
04-Jun-2003
Document
51679
How To: Call Menuitem using Javascript/Visual Basic interface
Issue
How do I call the Scan menuitem using the javascript/Visual Basic interface?
Solution
The connection between Javascript and Visual Basic is the JSObject object. To get the full list of menuitem names, please refer to the Core API Reference under the Lists section.
Private Sub Command1_Click()
Dim gApp As Acrobat.CAcroApp
Dim gPDDoc As Acrobat.CAcroPDDoc
Dim jso As Object
Dim avdoc As Acrobat.CAcroAVDoc
Set gApp = CreateObject("AcroExch.App")
Set gPDDoc = CreateObject("AcroExch.PDDoc")
Set avdoc = CreateObject("AcroExch.AVDoc")
If gPDDoc.Open("c:\sample.pdf") Then
Set avdoc = gPDDoc.OpenAVDoc("c:\sample.pdf")
Set jso = gPDDoc.GetJSObject
'using javascript to call Scan menuitem
'jso.App.execMenuItem ("Scan")
gApp.Show
avdoc.Close (True)
gPDDoc.Close
gApp.Exit
End If
Set jsObj = Nothing
End Sub
Was this Knowledgebase document helpful?
Yes
No
The articles in this knowledgebase are intended for use by software programmers currently using an Adobe SDK to extend or customize an Adobe product. These articles may be highly technical in nature.
If you have questions about an Adobe Product that are not related to development or an SDK product please visit:
http://adobe.com/support/main.html
Copyright © Adobe Systems Incorporated. All rights reserved.
Terms of Use
Online Privacy Policy