Редагувати

Поділитися через


Recipients object (Outlook)

Contains a collection of Recipient objects for an Outlook item.

Remarks

Use the Recipients property to return the Recipients object of an AppointmentItem, JournalItem, MailItem, MeetingItem, or TaskItem object.

Use the Add method to create a new Recipient object and add it to the Recipients object. The Type property of a new Recipient object is set to the default for the associated AppointmentItem, JournalItem, MailItem, or TaskItem object and must be reset to indicate another recipient type.

Use Recipients (index), where index is the name or index number, to return a single Recipient object. The name can be a string representing the display name, the alias, or the full SMTP email address of the recipient.

Example

The following example creates a new MailItem object and adds Jon Grande as the recipient using the default type ("To").

Set myItem = Application.CreateItem(olMailItem) 
 
Set myRecipient = myItem.Recipients.Add ("Jon Grande")

The following example creates the same MailItem object as the preceding example, and then changes the type of the Recipient object from the default ("To") to CC.

Set myItem = Application.CreateItem(olMailItem) 
 
Set myRecipient = myItem.Recipients.Add ("Jon Grande") 
 
myRecipient.Type = olCC

Methods

Name
Add
Item
Remove
ResolveAll

Properties

Name
Application
Class
Count
Parent
Session

See also

Outlook Object Model Reference Recipients Object Members

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.