Hi all,
To Expand: The worksheet has 7 columns (File Name, Attachment, To, Subject, Body, CC, BCC). Each row has a recipient. Each recipient receives unique order information in the body of the e-mail. The macro will then send this information in an e-mail to each recipient.
Problem: Often, a recipient needs information for multiple orders. Using this macro, if a customer has 5 orders, they will appear on this list 5 times (the source of this data cannot be changed, each order instance will always appear on a new line). I am trying to modify the code (credits: found on ExcelTip) so this recipient, and any others that appear more than once on this list of data, will receive one e-mail with all their order information if there are multiples, instead of the reinforcement receiving multiple e-mails per order. (e.g.: Using previous example: recipient 1 will receive information for their 5 orders in one e-mail instead 5. recipient 2 will receive their 1 order. recipient 3 will receive their 2 orders. and so on.
Below is the code. I am currently trying to enter a Do Until-Loop (until the recipient doesn't match) and then move on but I don't think I'm doing it correctly. Thank you.
Bookmarks