1

I am trying to change a MSWord 2013 mail merge document so that it points to a MS SQL DB rather then the original MS Access DB which just linked to the SQL DB tables. Basically I want to remove Access from the equation and query the MS SQL DB directly (via ODBC).

I am having trouble editing the original document. When I open the doc it runs the query immediately. How do I change this?

5 Answers 5

1

Open:

  1. Merge Letter --> Mailings --> Start mail merge
  2. Step by step mail merge wizard --> select a different list
  3. Select 'Table' or 'Query' --> OK button to confirm
  4. Click on 'preview results' --> Save document
0

You can't stop Word trying to connect to the existing data source, so typically you have to let Word display its SQL prompt, answer "no", then use the Mailings tab to connect to the data source you want. In the case of a SQl Server data source, if you have already set up a .odc using Word, that should be a question of selecting the .odc as the data source.

The only other way these days is to edit the .xml stored in the .docx directly - it's mostly in the settings.xml file, but there are usually one or two releationships that would point to the .odc file, for example.

BTW, this may have changed in Word 2013, but in earlier versions there was a problem getting data from Unicode field types in SQL Server (NVARCHAR etc.) using ODBC. To avoid that, you have to use OLE DB (which is what Word actually uses by default). This is despite the fact that Microsoft seems to be shifting back to ODBC as the standard for SQL Server connections.

0

I wanted to change my MailMerge source and came across this link. Under Microsoft Word 2013 you need the Mailings -> Select Recipients option / Use an Existing List.

I was using an Excel database so selected Excel from the file name filter list and then navigated to the place I had my spreadsheet. It all updated and I was ready to go.

0

When you open your Word doc you're asked if you want to connect to the data - [Yes]. It then says it can't find the source (in my case it was a local .mdb) and brings up a window showing the previously saved link. Edit that and [Save]. It all works fine. Save the doc. But the next time you open it, it still has the old connection stored.

Using the abovementioned steps to navigate to where the database is now stored, then [OK] and [Save] the doc and all is fixed.

Why oh why isn't there an 'Edit Data Source' available?

0

Go through the process as described above, and make sure to follow all steps to "complete the merge" at the end of step 6 of the process. (all the way up to printing). Then SAVE. Now when you open the doc it will prompt you to run the SQL and not give you the error. You can also validate this by going to Edit Recipient list and seeing your new data source as the one listed.

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 22, 2021 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .