Is it possible to have Word 2007 access a MySQL database?

5,377

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:
5,377
DWilliams
Author by

DWilliams

Information Systems Technician in the US Navy

Updated on September 17, 2022

Comments

  • DWilliams
    DWilliams over 1 year

    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?

  • DWilliams
    DWilliams over 14 years
    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.