Below is a snippet of the code I use to send emails from excel. I would like to expand this to change the sent from based on a list of vendors. So What I think is as the email is generating it would compare the field "VND" which is the vendors name against an excel spreadsheet and change the "BEHALF" to the corresponding email for the assigned account rep.
Do you think this can be done?
Do you think this can be done?
Code:
Const Behalf = "wmtsubcontractors@cfm-us.com" ' <-- Name to send on behalf of Exchange profile/account
'Specify email recipients, subject, etc:
.To = sal
'.Cc = "carboncopy@..."
.Subject = "- Past Due open Order Report for - " & VND & " --- " & tdd
.SentOnBehalfOfName = Behalf
.Send '<-- Directly send out this email, use .Display instead for the debugging only