• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to print data from excel to a PDF form

sia5234n

New Member
Hi,

I am new to this forum and VBA and hoping I could get some help.

I have an excel spreadsheet that looks like the attached file. The rows in the spreadsheet are identified by the data in the column ID

I would like to create a macro that does the following once after I finish checking the boxes in column 'M':

1. Group the rows and sum the values in data5 by the ID and save them to a PDF form and print the PDF form on my networked printer.

The fields in the PDF forms are named same as the column names in the spreadsheet (ID, LN, FN, Email, data1, data2, data3, data4, data5, data6).

Thanks for your help!
 

Attachments

Hi, sia5234n!

As a new user you might want (I'd say should and must) read this:
http://chandoo.org/forum/forums/new-users-please-start-here.14/

And regarding your issue, if you haven't performed yet the search herein, try going to the topmost right zone of this page (Search...), type the keywords used in the title when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.try consider uploading a sample file (including manual examples of desired output if applicable), it'd be very useful for those who read this and might be able to help you. Thank you.

This question has been posted many times so I think you'll be lucky with your search.

Regards!
 
Hi, SirJB7

Thanks for your prompt response!

I have searched the forum and found a topic little bit relative to mine but what I'm exactly looking for is using a check box to print the relevant data to a PDF form.

I have Test Excel file-2 attached and a Test PDF form and desired result in the Output folder. I like to use the checkbox in the Test Excel file-2 to select the rows and at the end print the grouped data using the test PDF Form and save the PDF in the Output folder.

Thank you!
 

Attachments

SirJB7,

I have gone through the sublink to Adobe FDF page at the Excel Hero page and modified the code to suite the excel file 'Test_data' in the link below, however, it throws an error that Acrobat could not open the .fdf file. Could you please help me find out why it's giving me that error?

In the Adobe FDF example in Excel hero page it prints to the FDF when a cell in desired row is selected. Is there a way to make it print to the PDF form only when a check box in the desired row is selected in the excel sheet?

Also is there a way to insert an image into the signature field on the PDF form. I have inserted an image that says "Signature" in the excel sheet?

Thanks!

https://www.dropbox.com/s/ujy7uhk7ugfqj3n/PDF_Form.pdf

https://www.dropbox.com/s/ufvp2ohbakd2jdi/Test Data.xls
 
Hi, sia5234n!
As I wrote you upwards I never dealt with PDF forms filling, so I assume it'll take me some time. Get back to you in a couple of days, I hope.
Regards!
 
Back
Top