![]() 'Specify the path of the sample PDF form. 'Adobe Reader because you will get an "ActiveX component can't create object" error. 'However, the code works ONLY with Adobe Professional, so don't try to use it with 'The code uses late binding, so no reference to external library is required. 'each row is used to create a new PDF file, which is saved in the Forms subfolder. 'Test Form, which is located in the same folder with this workbook. 'This macro uses the data in sheet Write in order to fill a sample PDF form named The code of both macros can be easily adjusted to work with any PDF form, as long as the PDF form’s field names are known. If a PDF file is found, the macro opens it, reads specific fields from the file, and writes the values in the “Read” sheet. On the other hand, the ReadPDFForms macro loops through all the files in the specified folder (Forms). The First Name and Last Name columns in each row are combined to create the PDF file’s name. ![]() The data from each row is used to create a new PDF file, saved in the Forms subfolder. ![]() The WritePDFForms macro uses the sheet Write to fill the Test Form, which is located in the same folder as the sample workbook. Below you will find VBA code for writing and reading data from Test Form. Moreover, if you have data in an XML file, you can import the data in Excel and then run the macros provided here.įor demonstration purposes, I have created a sample conference PDF form (Test Form). Although this post doesn’t answer Mac’s request directly, it provides some ideas to anyone who wants to exchange data with PDF forms using Excel and Adobe Professional. ![]() I had never worked with PDF forms until that time, so it was an excellent opportunity to learn something new. ![]() He actually wanted to fill the fields of a PDF form using data from an XML file. Mac commented in an old post about a problem he had with a PDF form. This post is based on a blog reader request. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |