Copy link to clipboard
Copied
In short, what I am trying to do is to is to code a button in an Acrobat file that, when pressed, will run some Javascript within Acrobat -- say, app.alert("You have pressed me!"); and also somehow will call a routine in an Excel VBA file -- say msgbox "That's right, you pressed that button in Acrobat!"
Obviously it's trivial to do the first part. But the second part seems like it should be easy, but that it might be impossible.
Is there any way to send a message to VBA whenever a particular event (like a button-press) occurs in Acrobat?
(I can create a somewhat slow and clumsy work-around by setting up a global variable in Acrobat Javascript that updates whenever a button is clicked, and then continuously polling the value of that global variable from Excel using getJSObject. But in my particular project, this is undesirable and I am hoping that perhaps there is a cleaner and more direct way to accomplish the same thing.)
‌Should hopefully be impossible by any means.
Copy link to clipboard
Copied
‌Should hopefully be impossible by any means.
Copy link to clipboard
Copied
There may be more elegant ways of doing this, but probably only by using the more extensive developer interfaces of Excel and Acrobat. For example you can produce a new Action handler for Acrobat that can be called from the button and update a cell/variable in Excel. My company is working on an Acrobat plug-in at the moment that can talk directly to Excel so I know that this can be done.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now