Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
DWilliams DWilliams is offline
external usenet poster
 
Posts: 1
Default Mail merge from two data sources with query?

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mail merge using two data sources Nathan Mailmerge 1 February 4th 08 09:16 PM
Mail Merge using two different data sources. Ru4reele Mailmerge 1 October 7th 06 01:14 AM
Can I do a mail merge with 2 separate data sources LouLou Mailmerge 2 July 14th 06 09:33 AM
Mail merge using two data sources in same document Mommasbroke Mailmerge 5 December 10th 05 08:59 AM
Can I mail merge using two or more data sources Caz Microsoft Word Help 1 January 28th 05 04:55 PM


All times are GMT +1. The time now is 12:19 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"