PDA

View Full Version : Solved: VBA exporting data to fill up PDF field from Excel



LeoLee
03-01-2011, 08:13 PM
Hi All,

Please advise me if this is feasible.

I have an Excel file which the user will fill in the data. (It is a invoice application)

The user will then click a button in Excel which will automatically write the data to the field in PDF. (Sometime like a mail merge)


The look and field in PDF is exactly the same as Excel file.



Not sure whether this can be done by using VBA to map the field in Excel to PDF.

Can anybody help me out on this one? My VBA coding skills are so poor and I can`t even know where to start from.

Thanks a million

Kenneth Hobs
03-02-2011, 07:25 AM
Doing something like that is beyond what VBA can do. PDF forms if they can be filled, will need JAVA code to do its thing. You will need to use a 3rd party program like pdftk to send input parameters by VBA's Shell() command or create your own .net program and Shell() to it from VBA.

Not all PDF forms can be filled by another non-Adobe program. I had some problems with pdftk so I created my own as explained below.

I created a vb.net EXE that accepts command line parameters using iTextSharp.dll. You can see how I coded it and get the program and see the comments about it at: http://www.wpuniverse.com/vb/showthread.php?s=&threadid=32338

Of course creating a PDF from an Excel data range is easy in version 2010.

LeoLee
03-02-2011, 08:24 PM
Hi Kenneth,

Thank you for your reply. Your post is awesome.. I will take my time to learn it and go through all your tutorials.

Once again, thanks!!!

Regards,
Leo