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:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Content[/TD]
[TD]Customer[/TD]
[TD]Package Number[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]11[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD]Bob[/TD]
[TD]22[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Watermelon[/TD]
[TD]Jill[/TD]
[TD]33[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]44[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Strawberry[/TD]
[TD]Tom[/TD]
[TD]55[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
Ref Table:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Neighborhood[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Serra Mesa[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]North Park[/TD]
[/TR]
[TR]
[TD]Jill[/TD]
[TD]Pacific Beach[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Content[/TD]
[TD]Customer[/TD]
[TD]Package Number[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]11[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]44[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
----------------------------------------------------------------------------------------------
Example Email for Jill:
To: Jill
Subject: Pacific Beach: Package Arrived containing Watermelon
Body:
Hi Jill,
Your package containing the following info has arrived
[TABLE="width: 500"]
<tbody>[TR]
[TD]Content[/TD]
[TD]Customer[/TD]
[TD]Package Number[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD]Watermelon[/TD]
[TD]Jill[/TD]
[TD]33[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
----------------------------------------------------------------------------------------------
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!
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:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Content[/TD]
[TD]Customer[/TD]
[TD]Package Number[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]11[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD]Bob[/TD]
[TD]22[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Watermelon[/TD]
[TD]Jill[/TD]
[TD]33[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]44[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Strawberry[/TD]
[TD]Tom[/TD]
[TD]55[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
Ref Table:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Neighborhood[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Serra Mesa[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]North Park[/TD]
[/TR]
[TR]
[TD]Jill[/TD]
[TD]Pacific Beach[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Content[/TD]
[TD]Customer[/TD]
[TD]Package Number[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]11[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]Tom[/TD]
[TD]44[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
----------------------------------------------------------------------------------------------
Example Email for Jill:
To: Jill
Subject: Pacific Beach: Package Arrived containing Watermelon
Body:
Hi Jill,
Your package containing the following info has arrived
[TABLE="width: 500"]
<tbody>[TR]
[TD]Content[/TD]
[TD]Customer[/TD]
[TD]Package Number[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD]Watermelon[/TD]
[TD]Jill[/TD]
[TD]33[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
----------------------------------------------------------------------------------------------
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!