HeitmanProgrammers
asked on
Creating a button on the Acrobat Application that will process menu item
using vb.net and SDK how can I create a button that will process a menu item? I know you can do it using JSObject but I don't know how.
ASKER
what do you dim Button as also I want to run the Batch Process which is under Advanced > Batch Processing and once the Batch Processing menu comes up, I want to execute the Run Sequence button. I tried doing this with SendKeys in Vb .net but I can't get the focus on Run Sequence button.
ASKER
I tried your code however I am getting nullReference error
Sorry, this was a cut&paste error. It's supposed to be
Dim button As Object
This JavaScript command will open the "Batch" dialog:
app.execMenuItem("BatchEdi t");
Dim button As Object
This JavaScript command will open the "Batch" dialog:
app.execMenuItem("BatchEdi
ASKER
all right i can get to that, but how can programmatically click on the "Run Sequence" button?
This is not possible with JavaScript. Adobe did not expose the batch sequences to JavaScript (probably to prevent you from automating Acrobat and use it in a way not licensed by the EULA).
ASKER
so what is my option to be able to click on the "Run Sequence" button?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
all right, I am just running out of options on this.. thanx for your help Khkremer.
Dim App As Acrobat.CAcroApp
Dim PDDoc As Acrobat.CAcroPDDoc
Dim AVDoc As Acrobat.CAcroAVDoc
Dim jso As Object
Dim coord(3) As Integer
Dim button
App = CreateObject("AcroExch.App
AVDoc = CreateObject("AcroExch.AVD
AVDoc = App.GetActiveDoc
PDDoc = AVDoc.GetPDDoc
jso = PDDoc.GetJSObject
coord(0) = 100
coord(1) = 100
coord(2) = 172
coord(3) = 136
button = jso.AddField("NewField", "button", 0, coord)
button.setAction("MouseUp"