Mail-merging with Word, MySQL... and Perl?
- From: George Adams <g_adams27@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 07 Aug 2007 17:05:15 -0400
I'm trying to do a mail-merge in Microsoft Word 2003 using an ODBC connection to my MySQL database on my Linux box. The finished product will be a paper name/address/phone/etc. directory for our church. Normally this would work fine, except I don't want to just simply grab and merge the data from certain fields in the database. I need to be able to insert some programming logic.
For instance, I'll want to look at the age of the children listed in the database, and if they're older than (say) 18, I won't display their birthday. Or if a couple has its anniversary listed, I'll want to format that in BOLD and display it. Or if the listed person is a member, I'll want to format their name in a slightly different way. etc. etc. All of which is a little much for SQL to handle (or at least for *me* to handle in SQL).
For a normal project, this would be a simple job for Perl. What I can't figure out is, is there anyway to insert Perl into this mail-merge process? Obviously MS-Word wants to query a database over ODBC, not a Perl script. Is there a way to change that so Word will get its data from the Perl script directly (which would be written to generate that data in whatever format Word is looking for it?)
Thanks to anyone who can help!
.
- Follow-Ups:
- Re: Mail-merging with Word, MySQL... and Perl?
- From: Doug Robbins - Word MVP
- Re: Mail-merging with Word, MySQL... and Perl?
- Prev by Date: Re: Mail merge without using the wizard every time?
- Next by Date: Re: Moving Excel->Word Links
- Previous by thread: Re: Mail merge without using the wizard every time?
- Next by thread: Re: Mail-merging with Word, MySQL... and Perl?
- Index(es):
Relevant Pages
|
Loading