O
OssieMac
The following is an extract of code that I use to send emails from an Excel
program. How can I modify it to use peoples names as they appear in my
address book in lieu of using their actual email address for .To, .CC and .BCC
strTo = "ossiemac@ossiemac.com" 'Sample. Not valid email address
strCC = "myfriend@friends.com" 'Sample. Not valid email address
strBCC = "secretfriend@secrets.com" 'Sample. Not valid email address
Set objMail = objOutlook.CreateItem(olMailItem)
With objMail
> To = strTo
> CC = strCC
> BCC = strBCC
> Subject = strSubject
> Body = strBody
> DeleteAfterSubmit = True 'Does not save email in Sent mail folder.
> Display
> Send
End With
Regards,
OssieMac
program. How can I modify it to use peoples names as they appear in my
address book in lieu of using their actual email address for .To, .CC and .BCC
strTo = "ossiemac@ossiemac.com" 'Sample. Not valid email address
strCC = "myfriend@friends.com" 'Sample. Not valid email address
strBCC = "secretfriend@secrets.com" 'Sample. Not valid email address
Set objMail = objOutlook.CreateItem(olMailItem)
With objMail
> To = strTo
> CC = strCC
> BCC = strBCC
> Subject = strSubject
> Body = strBody
> DeleteAfterSubmit = True 'Does not save email in Sent mail folder.
> Display
> Send
End With
Regards,
OssieMac