Forum Discussion
Excel File E-Mail Merge Setup
Hello,
I have an Excel spreadsheet that I want to use to set up an e-mail merge in Outlook; however, the file is exported from another source and isn't setup for a mail merge process. There is one row per data but many rows are assigned to the same person. Is it possible to provide the recipient with an email that lists all rows of data as separate rows without attaching a file. For example:
| QMS Process Lead - Switzerland | John Doe | VWR : Europe : Switzerland | D7412 |
| QMS Process Lead - Switzerland | John Doe | VWR : Europe : Switzerland | D7413 |
| QMS Process Lead - Switzerland | John Doe | VWR : Europe : Switzerland | D7414 |
Ideally, the email would go to John Doe and the table in his email would look like this:
| EtQ Location | Document Number |
| VWR : Europe : Switzerland | D7412 |
| VWR : Europe : Switzerland | D7413 |
| VWR : Europe : Switzerland | D7414 |
Is this possible?
3 Replies
- Harun24HRSilver Contributor
Excel VBA could be a easier and effective solution.
- Michelle_Scott77Brass Contributor
Yes. You need to group the rows by recipient and send one email per person, with their matching rows formatted as an HTML table. A standard Word email merge normally sends one message per source row, so it will not automatically combine your three John Doe records.
For a Microsoft 365 work account, Power Automate is a practical way to do this:
- Add a recipient email address column to Excel. Use that to group records rather than the person’s name, since names may not be unique.
- Format the source range as an Excel table and save the workbook in OneDrive for Business or SharePoint.
- Create a manually triggered flow and use Excel Online (Business) > List rows present in a table to read the records.
- Create a distinct list of email addresses. One common method is a Select action containing only the email field, followed by a Compose expression such as union(body('Select'),body('Select')).
- Use Apply to each on that distinct list. Inside the loop, use Filter array to keep only rows matching the current email address.
- Pass those filtered rows into Create HTML table. Choose custom columns for EtQ Location and Document Number, then insert the output into the HTML body of Office 365 Outlook > Send an email (V2).
John would then receive one email containing all three document rows, with no attachment.
Enable pagination on the Excel action if you have more than 256 records. Before sending to real recipients, test with a small sample and route the messages to yourself to verify that each table contains only that recipient’s records.
- Sue_GBrass Contributor
Hello Michelle,
Thank you for your assistance but I'm afraid most of the instructions are above my skill level. Email addresses are in the file and it's already formatted as a table. This is a new task for me and I don't know how to write code. Would you be able to provide more detailed step-by-step instructions?