jack3_99
asked on
Include Name with email when sending emails from Excel using CDO
I am using the CDO function in Excel to send batches of emails. I would like to include the recipient's name in addition to their email address in the To field.
Their name is referenced by cell.Offset(0, 2).Value and their email is reference by cell.Offset(0, 3).Value.
I receive an error if I simply concatenate the two fields together (cell.Offset(0, 2).Value & cell.Offset(0, 3).Value)
Can I include their name in the To field? If so, what is the syntax?
Thank you in advance for any help.
Their name is referenced by cell.Offset(0, 2).Value and their email is reference by cell.Offset(0, 3).Value.
I receive an error if I simply concatenate the two fields together (cell.Offset(0, 2).Value & cell.Offset(0, 3).Value)
Can I include their name in the To field? If so, what is the syntax?
Thank you in advance for any help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dave,
I appreciate your quick response. I did have to modify it slightly to work within the rest of my code.
.To = cell.Offset(0, 2).Value & " < " & cell.Offset(0, 3).Value & " > """
Thank you,
Jack
I appreciate your quick response. I did have to modify it slightly to work within the rest of my code.
.To = cell.Offset(0, 2).Value & " < " & cell.Offset(0, 3).Value & " > """
Thank you,
Jack
Right. Looks like I put that entire formula in quotes ;) Glad its working well for you.
http://www.rondebruin.nl/cdo.htm
However, I'm testing this now:
.To = [EMAIL="Recipient's Name"]emailAddress@whateve
Dave