Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible to have Acrobat Javascript send a message to Excel VBA?

Community Beginner ,
Mar 09, 2016 Mar 09, 2016

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.)

TOPICS
Acrobat SDK and JavaScript
4.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 09, 2016 Mar 09, 2016

‌Should hopefully be impossible by any means.

Translate
LEGEND ,
Mar 09, 2016 Mar 09, 2016

‌Should hopefully be impossible by any means.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 13, 2016 Mar 13, 2016
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines