VBA Import data from Excel to PDF text boxes

TBRoberts

New Member
Joined
Mar 11, 2016
Messages
23
Hey guys/gals, I'm trying to use VBA to populate an interactive PDF with data used from excel.

Please refer to the following link, which describes what I am trying to accomplish:

http://forums.adobe.com/thread/2069492


Excel data will consist of accounting values, such as various line items consisting of credits, debits, amounts, dates etc..

There will be a text box at the bottom of this PDF, which will consist of a narrative, incorporating total number of credits, total number of debits, date range of activity ("from xx/xx/xx to xx/xx/xx, there were xx credits and xx debits totaling $xx.xx"). I would like to populate the referenced "xx" with data from the excel spreadsheet.

I was wondering if it is possible to automate this process with VBA. I have tried searching the web to no avail, so if there are any good resources on this topic that you may know of, please share!

- TBR
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Just to clarify - I would like the macro to populate the text boxes in the PDF as shown in the link provided AND populate the referenced narrative portion.
 
Upvote 0
The link you provided shows Form fields and not "Text Boxes".

If you have Acrobat Standard or Pro; you can import a Tab Delimited file of your data. I have created Excel workbooks that have utilized Excels "Defined Names" as means of mimicking the Form Field names and then Scripted the workbook to create a Tab delimited file with the first line equal to the Acrobat Form Field Names and then the second line equal to the value that is within those cells. Similar to the link you presented.

If you have the Standard or Pro software; you can then import the Tab Delimited file. PDF's are incremental forms, so you should occasionally save as an earlier version of Adobe. Otherwise your form will continue to grow in size with every import.

Additionally you can set up forms that Adobe Reader users can select a button that will import the tab delimited file. This functionality, however, is extremely limited due to security issues and you would have to set up a folder permission to allow this.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top