Share via


AddMultiple Method (Recipients Collection)

AddMultiple Method (Recipients Collection)

The AddMultiple method creates zero or more new Recipient objects in the Recipients collection.

Syntax

objRecipColl.AddMultiple(names [, type] )

objRecipColl

Required. The Recipients collection object.

names

Required. String. A list of zero or more resolvable recipient strings delimited by semicolons. Each resolvable string can be a messaging users display name or a messaging address with or without the address type. A messaging address without address type must be an SMTP (Simple Mail Transfer Protocol) address usable on the Internet.

type

Optional. Long. The recipient type; the initial value for the Type property that is to apply to all the new recipients. The following values are valid:

Recipient type

Value

Description

CdoTo

1

The recipients are on the To line (default).

CdoCc

2

The recipients are on the Cc line.

CdoBcc

3

The recipients are on the Bcc line.

Remarks

The AddMultiple method is useful when responding to standard e-mail forms that invite the user to enter a series of recipients in a connected list, such as the To and Cc lines for a Microsoft® Exchange Client message.

The AddMultiple method does not resolve the new recipients. You must call either each recipients Resolve method or the Recipients collections Resolve method following the AddMultiple call.

Example

This code fragment illustrates the different possibilities of resolvable recipient strings:

Dim name1, name2, name3, toStr As String
name1 = "User One" ' display name
name2 = "user2@example.com" ' SMTP address without address type
name3 = "User Three[SMTP:user3@example.com]" ' full messaging address
toStr = name1 & ";" & name2 & ";" & name3
objRecipients.AddMultiple (toStr, CdoTo)
objRecipients.Resolve()
 

See Also

Concepts

Recipients Collection Object