Wow, yet another person wants us to do their homework. Please read the forum rules!
"Mail Merge" is basically about content management. We want to take a form letter and add in some variables so that they letter can be used over and over to various "recipients". So we want to change the address at the top of the letter, the name of the person the letter is headed to, maybe even add some specific strings into the text of the document. Basically we are talking about the electronic equivalent of:
QUOTE
So and So Associates Inc.
10101 Binary Drive,
Somewhere, USA.
__________________
__________________
__________________
________
Dear ___________;
Thank you very much for your recent correspondence concerning __________, however we regret to inform you that we really don't care.
very insincerely,
Vice President of Automated Affairs,
_____________
_____________
Generally this is done by creating a template form where there are markers indicating where replacements are to be made (much like creating a Mad Lib program). There are lots of ways to do this. Recently I did a program in Java that would work like this. I pass in a string containing template text and a list of name-value pairs that represent substitutions.
Template text would look like this:
QUOTE
So and So Associates Inc.
10101 Binary Drive,
Somewhere, USA.
${Recipient.address}
${date}
Dear ${Recipient.title} ${Recipient.lastName};
Thank you very much for your recent correspondence concerning ${topic}, however we regret to inform you that we really don't care.
Very Insincerely,
Vice President of Automated Affairs,
${signature.image}
${signature.text}
${signature.date}
Other than this: