• 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.

Copy data from excel to letter template (Word doc)

Hi friends,

I want to develop a code for automatic letter generator, by taking data from Excel file and putting it is letter template. When I googled for this I found many codes which can do my job, by copying the data from Excel’s each row and pasting it in letter template (in other words for each row of data, one letter is generated).

But in my case, the data to be copied is in multiple adjacent rows, hence those codes are not working for me. I tried for last two days, but of no use, can you please help me on this.

My requirements: -
• Copy data from sheet (Transfer), and paste in letter template (both sample excel file and letter template are shared for easy understanding)
• For each employee ID, one letter will be generated. Hence for this sample file, total of 3 letters will be generated and saved in the same folder. In actual scenario more than 30 letters will be generated
• In letter template, employee’s full name will go in {SALUTATION} {FIRST NAME}

I have attached one filled letter template as it should be created by taking the data from excel file.

Thanks & regards,
 

Attachments

  • Sample data.xlsm
    10.8 KB · Views: 2
  • Letter template.docx
    33.7 KB · Views: 1
Back
Top