我想隐藏发件人电子邮件ID ,而不是隐藏收件人姓名,如下所示
以下是我通过 CDO
发送电子邮件的脚本的一部分With iMsg
Set .Configuration = iConf
.To = "open.dealerz@gmail.com"
.CC = ""
.BCC = ""
.From = "Dealer <open.dealerz@gmail.com>"
.Subject = "Test"
.TextBody = ""
.Send
End With
答案 0 :(得分:1)
尝试根据地址簿解析收件人。然后,您将看到名称而不是电子邮件地址。 Recipients类的ResolveAll方法(请参阅MailItem类的corresposning属性)尝试根据通讯簿解析Recipients集合中的所有Recipient对象。
Sub CheckRecipients()
Dim MyItem As Outlook.MailItem
Dim myRecipients As Outlook.Recipients
Dim myRecipient As Outlook.Recipient
Set myItem = Application.CreateItem(olMailItem)
Set myRecipients = myItem.Recipients
myRecipients.Add("Aaron Con")
myRecipients.Add("Nate Sun")
myRecipients.Add("Dan Wilson")
If Not myRecipients.ResolveAll Then
For Each myRecipient In myRecipients
If Not myRecipient.Resolved Then
MsgBox myRecipient.Name
End If
Next
End If
End Sub