Mail merge multiple data rows to one email address

stebrownsword

Board Regular
Joined
Apr 16, 2010
Messages
151
[TABLE="width: 500"]
<tbody>[TR]
[TD]Email
[/TD]
[TD]Data
[/TD]
[/TR]
[TR]
[TD]Ste@google.com
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]ste@google.com
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]Bob@google.com
[/TD]
[TD]A
[/TD]
[/TR]
[TR]
[TD]Bob@google.com
[/TD]
[TD]B
[/TD]
[/TR]
</tbody>[/TABLE]

Hi guys

is there a way that I can mail merge 1 email with several rows of data, instead on several emails with 1 row of data?

desired result - Ste recieves 1 email which states 1+2 and bob recieves an email which states A+B

at the moment - Ste recieves 2 emails 1 email stating 1 the other email statin 2 , Bob recieves 2 emails 1 email wth A another email with B
 
It's a browser link to a text file on Google drive- Just click on it.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I've got the code etc, its when I run the code it comes up with Run-Time Error '424': Object required

I think its around - create the HTML table and header from the first row?
 
Upvote 0
I've cut and pasted the code and I don't see any issues.

I've sent you a PM. If you can send me a copy of the workbook with anything important substituted I'll take a look at it.
 
Upvote 0
As Outlook sends mails in html format you can create a complete html page in vba to include the style headers etc.
This allows you to add css within the style tags to format the mail as you would any html document.
The code below sends the mail with selected fonts, style and colour, table background/border colour.

https://drive.google.com/open?id=1bhPkhgDto3CxeHC_XwkLDzvMzSibp30i
 
Upvote 0

Forum statistics

Threads
1,223,631
Messages
6,173,465
Members
452,516
Latest member
archcalx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top