Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What I essentially want is some way to expand my mail merge system. If an account number gets sent to a word document via mail merge, I would like some way for Word to connect to a MySQL database and use that account number to execute additional queries and retrieve information.

For one, I don't see the option in Word to create database connections. Excel has a ribbon tab for data connections, so I tried playing around with it and in typical Microsoft fashion, they seem to have "forgotten" that any non-Microsoft products exist and only let me choose MSQL or Access databases.

I googled for a solution and the only real promising thing I found required full Visual Studio tools, which I don't have (and this is for work so I can't really get by with using the personal free editions).

Is there any way I can manage this? If Word cannot connect directly to a MySQL database, can it do something like execute a perl script that connects to the database and returns query results?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Yes, you can.

  1. Install the MySQL ODBC driver.
  2. Create an ODBC data source
  3. When doing your merge choose the ODBC source when setting your data source for the merge (instead of Access or Excel, etc).
share|improve this answer
    
Thanks, that appears to have worked. I still have a few remaining issues (specifically, how to query that information), but that's beyond the scope of this question so I'll consider this one solved. –  DWilliams Sep 18 '09 at 19:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.