Show friendly display name in the “FROM” and “TO” fields using CDOSYS

I was trying to find an example that would display a “Friendly name” vs. an “email address” when generating emails using CDOSYS.   Here is the code to do this.


             Set imsg = Createobject(“cdo.message”)

With iMsg


   .To = “John Monday <firstname@changethistoyouremail.com>”


   .From = “Steve Friday <me@changethistoyouremail.com>”


   .Subject = “A Subject Line: ” & Now()


   .TextBody = “A Text body message”


.Send


End With


Set imsg = nothing


Other links I found


 


 


 

Sample Chapter 1.21 CDO library
http://www.cdolive.com/procdo.htm

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s