vbMAPI Outlook/MAPI Code Library
(v1.16.3)
- QuickStart: Installation
- QuickStart: The basics
- Code Examples
- Tips for C#
- Tips for VB.NET
- Examples: Profile Administration
- ref: vbMAPI_Session
- ref: vbMAPI_Options
- ref: vbMAPI_Accounts
- ref: vbMAPI_Account
- ref: vbMAPI_Stores
- ref: vbMAPI_Store
- ref: vbMAPI_Folder
- ref: vbMAPI_Folders
- ref: vbMAPI_FolderItems
- ref: vbMAPI_ContactItem
- ref: vbMAPI_AppointmentItem
- ref: vbMAPI_MailItem
- ref: vbMAPI_Properties
- ref: vbMAPI_Property
- ref: vbMAPI_Recipients
- ref: vbMAPI_Recipient
- ref: vbMAPI_Attachments
- ref: vbMAPI_Attachment
- ref: vbMAPI_EncodedBody
- ref: vbMAPI_Profiles
- ref: vbMAPI_Profile
- ref: vbMAPI_ProfileProviders
- ref: vbMAPI_ProfileProvider
- ref: vbMAPI_ProfileProviderConfig
- ref: vbMAPI_ProfileServices
- ref: vbMAPI_ProfileService
- ref: vbMAPI_ProfileServiceConfig
- ref: vbMAPI_OutlookSignatures
- ref: vbMAPI_OutlookSignature
- ref: vbMAPI_AddressBook
- ref: vbMAPI_AddressLists
- ref: vbMAPI_AddressList
- ref: vbMAPI_AddressEntries
- ref: vbMAPI_AddressEntry
ref: vbMAPI_Recipients
On this page you'll find:
Overview
Equivalent MAPI object: IMAPITable
Equivalent Outlook Redemption object: Redemption.RDORecipients
Equivalent Outlook Object Model object: Outlook.Recipients
Parent: vbMAPI_MailItem
Class Description
This object represents a collection of vbMAPI_Recipient objects. Preferably, use the For-Each syntax to enumerate the collection. Use Add method to add a new recipient, or use the parent object To/CC/BCC members to set a string list.
Property Get Count() As Long
Returns the count of items in this collection.
Property Get Item(ByVal IndexOrName As Variant) As vbMAPI_Recipient
Returns the item in the collection corresponding to the provided Index (Long) or Name (String).
Function Add(Optional ByVal NameOrObject As Variant, _
Optional ByVal RecipientType As EnumRecipientType = Recipient_TO) As vbMAPI_Recipient
Adds a new recipient to the collection.
(OPTIONAL) NameOrObject: You can pass in a string name/address, or a vbMAPI_Recipient object from another collection, or even a vbMAPI_AddressEntry object.
Function AddEx(ByVal Name As String, _
Optional ByVal Address As String, _
Optional ByVal AddressType As String, _
Optional ByVal RecipientType As EnumRecipientType = Recipient_TO) As vbMAPI_Recipient
Adds a new recipient to the collection.
Name: string representing vbMAPI_Recipient.Name property
(OPTIONAL) AddressType: string representing vbMAPI_Recipient.AddressType property
(OPTIONAL) RecipientType: string representing vbMAPI_Recipient.RecipientType property.
Property Get Session() As vbMAPI_Session
Returns the session object associated with this object.
Sub ShowAddressBook(Optional ByVal Title As String, _
Optional ByVal OneAddress As Boolean, _
Optional ByVal ForceResolution As Boolean = True, _
Optional ByVal NumRecipGroups As Long = &Hffffffff, _
Optional ByVal ToCaption As String, _
Optional ByVal CcCaption As String, _
Optional ByVal BccCaption As String, _
Optional ByVal ParentWindowHandle As Long)
Displays the address book modally and updates this vbMAPI_Recipients collection on completion. All parameters are optional.
Title: the title of the address book dialog.
OneAddress: If True, allows only a single recipient to be selected.
ForceResolution: If True, forces all recipients to be resolved before returning.
RecipLists: Number of recipient groups to be displayed (1 = To, 2 = To/CC, 3 = To/CC/BCC)
ToLabel: The caption for the To label, if displayed.
CcLabel: The caption for the Cc label, if displayed.
BccLabel: The caption for the BCC label, if displayed.
ParentWindowHandle: HWND handle to the parent window.
Function ResolveAll(Optional ByVal ShowDialog As Boolean = True, _
Optional ByVal ParentWindowHandle As Long) As Boolean
Calls Resolve on all vbMAPI_Recipient objects in this collection. Returns True if all recipients resolved successfully.
Sub Clear()
Empties this collection of recipients.