Recipients Property

Microsoft Outlook Visual Basic

Show All

Recipients Property

       

Returns a Recipients collection that represents all the recipients for the Outlook item. Read-only.

expression.Recipients

expression    Required. An expression that returns an AppointmentItem, JournalItem, MailItem, MeetingItem, or TaskItem object.

Example

This Visual Basic for Applications example creates a new mail message, uses the Add method to add "Allison Klein" as a To recipient, and displays the message.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myRecipient = myItem.Recipients.Add("Allison Klein")
myItem.Display

If you use VBScript, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript.

Set myItem = Application.CreateItem(0)
Set myRecipient = myItem.Recipients.Add("Allison Klein")
myItem.Display