I'm doing a mail merge from Excel to Word to generate letters to return customers' mail, I have the mail merge working just fine, but I'm looking to automate a certain portion of the process. I'd like to be able to enter the Customer ID number in Column A in Excel and have the rest populated by data from our SQL Server database, such as name, address, dates and payment amounts due, etc.

I know how to set up the external connection, and I know how to run an SQL query, but what I'm not clear on is how to query and return data to each row based on the ID number in that row. Or, whether such a query is even possible in Excel.

The Excel sheet is then an external data source to Word. I thought about merging directly to Word, but there are certain fields I need to type in manually in Excel before merging to Word, so I do need the intermediate step unfortunately.

Can this be done?