VBA Macro to Send Mutliple Emails to Multiple Contacts with Slightly Different Subject and Body

ak_254

New Member
Joined
Jan 9, 2018
Messages
10
Hi all,

This may be a bit of a long shot but I am trying to create or put together a VBA Macro for package distributions that will send out multiple email notification emails at once to the approriate point of contact each with slightly different subject header based on their location and the body of the email based on what the package contains.

Example:

Data Table:

ContentCustomerPackage NumberQty
ApplesTom111
OrangesBob223
WatermelonJill335
ApplesTom447
StrawberryTom553

<tbody>
</tbody>


Ref Table:

CustomerNeighborhood
TomSerra Mesa
BobNorth Park
JillPacific Beach

<tbody>
</tbody>


In this case I want to be able to send out 1 unique email to each customer based on what the content of the package contains. In this case there will be a total of 4 emails being sent out at once.

Tom - Apples (Package 11/44) *Since Tom has 2 packages containing apples it will consolidate the info into 1 email*
Bob - Oranges (Package 22)
Jill - Watermelon (Package 33)
Tom - Strawberry (Package 55)


Example Email for Tom:

----------------------------------------------------------------------------------------------
To: Tom
Subject: Serra Mesa: Package Arrived containing Apples

Body:

Hi Tom,

Your package containing the following info has arrived

ContentCustomerPackage NumberQty
ApplesTom111
ApplesTom447

<tbody>
</tbody>

----------------------------------------------------------------------------------------------

Example Email for Jill:

To: Jill
Subject: Pacific Beach: Package Arrived containing Watermelon

Body:

Hi Jill,

Your package containing the following info has arrived

ContentCustomerPackage NumberQty
WatermelonJill335

<tbody>
</tbody>

----------------------------------------------------------------------------------------------

Please let me know if you have any questions to better explain the issue.

Any help or point in the right direction is greatly appreciated!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,213,561
Messages
6,114,312
Members
448,564
Latest member
ED38

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