Share via

SQL prompt when opening mail merge document

Anonymous
2024-11-04T12:32:31+00:00

I've created a brand new document for mail merges. To do this, I selected a recipient list and then places the relevant merge fields into the document.

I've run a few mail merges with it, saving and closing the document each time. I've used different mailing lists which all have a table called My_Recipient_Table. When re-opening the document, I initially wasn't getting any pop-up messages.

However, I now get this pop-up every time I open the document:

"Opening this document will run the following SQL command:

SELECT * FROM 'My_Recipient_Table'

Data from your database will be placed in the document. Do you want to continue?"

I've worked with loads of mail merge documents and have never seen this before. I don't want the document to automatically link to a specific mailing list/table, and I don't want to have to deal with this pop-up every time I want to work with this document.

How can I get Word to stop automatically linking to this recipient list? I've tried going into Edit Recipient List and un-ticking the data source before saving and closing the document, but the same pop-up appears when re-opening the document.

Many thanks!

Microsoft 365 and Office | Word | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Paul Edstein 82,861 Reputation points Volunteer Moderator
2024-11-05T00:58:14+00:00

If you don't want the document to automatically link to the data source, answer No to the prompt, then save it. From now on, though, you will have to re-establish the link anytime you want to do a mailmerge.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2024-11-04T22:34:17+00:00

    As the article for which Suzanne provided the link states, that SQL warning message has been a feature since Microsoft XP something like 15 years ago

    The only way to prevent it appearing is to select Normal Word document from the Start Mail Merge dropdown and if desired, then re-select the type of mail merge main document and save the document before closing it.

    Then, when you open the document, you will need to use the Select Recipients facility to attach the required data source.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-11-06T09:54:53+00:00

    Ah, it's so simple! Thank you.

    Was this answer helpful?

    0 comments No comments
  3. Suzanne S Barnhill 278.1K Reputation points MVP Volunteer Moderator
    2024-11-04T23:32:35+00:00

    The Registry edit is the simpler solution for me.

    Was this answer helpful?

    0 comments No comments
  4. Suzanne S Barnhill 278.1K Reputation points MVP Volunteer Moderator
    2024-11-04T20:48:49+00:00

    Was this answer helpful?

    0 comments No comments