I followed the below example.
https://www.slipstick.com/developer/create-a-new-message-using-vba/
I want to display address book name when automatically making the email draft.
For example, in this case,
I am able to display "BZ@gmail.com" in the address field but I want to display an address book's name "Business Team" because "Business Team" is easier to see.
Here is my code. it is almost same as the example code.
Public Sub CreateNewMessage()
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
With objMsg
.To = "Alias@domain.com"
.CC= "Alias2@domain.com"
.BCC = "Alias3@domain.com"
.Subject = "This is the subject"
.Categories = "Test"
.VotingOptions = "Yes;No;Maybe;"
.BodyFormat = olFormatPlain ' send plain text message
.Importance = olImportanceHigh
.Sensitivity = olConfidential
.Attachments.Add ("path-to-file.docx")
' Calculate a date using DateAdd or enter an explicit date
.ExpiryTime = DateAdd("m", 6, Now) '6 months from now
.DeferredDeliveryTime = #8/1/2012 6:00:00 PM#
.Display
End With
Set objMsg = Nothing
End Sub
I can send only by "alisas@domain.com" and when I see the opened draft, email address displayed.
How can I display address book name on draft?