I use the term database loosely here -- it can be an actual database, or a spreadsheet (in any format including CSV) or can be package-dependent.
Is there a way to create mail-merged documents similar to what can be done in word processing packages? I found the
mailmerge package which sort of works but it puts all the mail-merged data into one document.
Is there a package or way to generate new, individual documents for each part of the database? In other words, if I have a
firstName value in whatever storage system, can I get LaTeX to generate a file called
<firstName>.dvi for each of the names in the database? Or do I need to resort to a scripting language driver to pull that off?
So to further explain what I am trying to do (and will now set it up based on the answer to Change document class per page ) :
I'm trying to create a "welcome to the company" sort of document that has a cover page, table of contents, welcome letter, then various sections of information. I've never tried this in anything other than a word processor where it's easy to set "master pages" or "template pages" for individual pages in the document. So I could use a letterhead template page for the welcome letter part and a standard article-type template for the rest and still have the letter numbered/referenced in the ToC.
If I use the approach on the answer there, how can I tell
\pdfpages which page to include? Ultimately I would like to have many files like
John.pdf etc. where each file is the same document with a custom letter embedded within.