With the explanation in the previous two blog posts, it should not be hard to understand what’s going on here. This program requires a PDF file with text fields called “Text1” and “Text2” to be stored as C:\temp\sampleForm.pdf. MsgBox "Values read from PDF: " & text1 & " " & text2įield2.Value = 13 ' assign the number 13 to the fields value ![]() ' get the information from the form fields Text1 and Text2 Set theForm = CreateObject("AcroExch.PDDoc") Set AcroApp = CreateObject("AcroExch.App") ![]() When we now use the following script as the button handler, we can work with form fields: Private Sub CommandButton1_Click() We start the same way as in my old VBA sample to create a VBA program that references the Acrobat TLB and to add a button to a document. I had to answer another question today about how to exactly do that, so I whipped up a quick sample program that demonstrates the use of the JavaScript Object (JSO) to read and write AcroForm fields. I’ve written about VBA and Acrobat JavaScript before, and I’ve also mentioned that you can combine VBA and JavaScript to access PDF form fields, but I still owe a sample for that.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |