收件人对象(Outlook)Recipients object (Outlook)

包含 Outlook 项目的**收件人** 对象的集合。Contains a collection of Recipient objects for an Outlook item.

备注Remarks

使用收件人属性可返回**AppointmentItemJournalItemMailItemMeetingItemTaskItem** 对象的收件人对象。Use the Recipients property to return the Recipients object of an AppointmentItem, JournalItem, MailItem, MeetingItem, or TaskItem object.

使用**Add** 方法可创建一个新的收件人对象,并将其添加到收件人对象。Use the Add method to create a new Recipient object and add it to the Recipients object. 类型 新的 收件人 对象的属性设置为相关联的 AppointmentItemJournalItemMailItemTaskItem 对象的默认值,必须对其进行重置,以指示另一个收件人类型。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. 名称可以是一个字符串,表示收件人的显示名称、别名或完整的 SMTP 电子邮件地址。The name can be a string representing the display name, the alias, or the full SMTP email address of the recipient.

示例Example

下面的示例创建一个新的 MailItem 对象,并将赵杰添加作为收件人使用的默认类型 ("到")。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")

下面的示例将创建与上一个示例相同的MailItem对象,然后将收件人对象的类型从默认值("To")更改为 CC。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
AddAdd
Item
RemoveRemove
ResolveAllResolveAll

属性Properties

名称Name
ApplicationApplication
Class
CountCount
ParentParent
SessionSession

另请参阅See also

Outlook 对象模型引用 收件人对象成员Outlook Object Model Reference Recipients Object Members

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.