I would like to send a string of data from a text field in Acrobat into my VBA code and then return the result (text string) of my vba code back into acrobat pro.
Karl is correct. However, there are tricks you can play.
You can use VBA to query Acrobat for the existence of an object (a variable or field value) at a fairly frequent interval, every quarter second for example. Pressing the button in Acrobat would create the object the VBA code is looking for and set it's value. At the next interval, your VBA code sees the object, gets the value, then runs whatever other code you want and pushes the result back to the PDF and deletes the object.
You'd need to have Acrobat and the application running the VBA running at the same time.
Thanks for your reply Joel.
I have created the string in Acrobat that I would like to send over to VBA. How would i send this string to VBA? Similarly in VBA how would i send the result back into Acrobat?
Can you please direct me to some documentation.
Thanks for directing me the right way. I also found this article (Reading And Modifying PDF Form Fields with VBA - KHKonsulting LLC ) which was great help .
What worked for me was creating a VB application that reads a field in an acrobat form and then sends a calculated value back to acrobat.