Email

H

Hermione

Hi

I want when sendins an email to display the name of the receiver
I tryed : ReceivedByName but it's not working

This is my code:

Dim objOLMail As Outlook.MAPIFolder
Dim objOutlook As New Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objOlMailItem As Outlook.MailItem

Set objNameSpace = objOutlook.GetNamespace("MAPI")
Set objOLMail = objNameSpace.GetDefaultFolder(olFolderOutbox)

'Create email
With objOLMail.Items.Add
.To = sEmail
.ReceivedbyName = sName
.Subject = sSubject
.HTMLBody = sMessage
.Send
End With

Set objOLMail = Nothing
Set objNameSpace = Nothing


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top