Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Alright so I have a pretty big mail merge goal here. At my work, we have a
MySQL database that stores information for use with our software system. The software has a mail merge feature that integrates with Word. It takes pre-created mail merge templates and exports its own values into those templates and proceeds with printing. This part works fine, but the problem here is that the fields it allows to be exported are somewhat limited in some cases. I'll use a real example to make this easier. We have one letter that needs to be addressed to the client of a customer. The built-in mail merge only exports the customer's address, but the client's address IS stored in the database. The only client information exported is the name. I've googled around and so far found a MySQL ODBC driver. I installed it and successfully set up an ODBC connection to our database and can see our client table in Word. This is where I get a little bit fuzzy, though. I don't have any idea how to have two data sources co-exist, and how to query one based on the other. What I need to do is this: Have the MySQL connection "built-in" to the document so that when the letter is selected to be mail merged from the software (and therefor given ANOTHER data source from the program), it can calculate what fields it needs from the database and plug them into additional fields (particularly the address). So, when the mail merge button is hit, ideally the mail merge template will know to run a query similar to "SELECT address FROM clients WHERE clientname={mailmerged_clientname". How can I accomplish this? If I'm on the wrong track and there's an easier way to solve this problem then please don't hesitate to tell me... |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
mail merge using two data sources | Mailmerge | |||
Mail Merge using two different data sources. | Mailmerge | |||
Can I do a mail merge with 2 separate data sources | Mailmerge | |||
Mail merge using two data sources in same document | Mailmerge | |||
Can I mail merge using two or more data sources | Microsoft Word Help |