The AddMultiple method creates zero or more new Recipient objects in the Recipients collection.
objRecipColl.AddMultiple(names [, type] )
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. |
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 recipient's Resolve method or the Recipients collection's Resolve method following the AddMultiple call.
This code fragment illustrates the different possibilities of resolvable recipient strings:
Dim name1, name2, name3, toStr As String
name1 = "John Doe" ' display name
name2 = "jimdoe@company.com" ' SMTP address without address type
name3 = "Jane Doe[SMTP:janedoe@company.com]" ' full messaging address
toStr = name1 & ";" & name2 & ";" & name3
objRecipients.AddMultiple (toStr, CdoTo)
objRecipients.Resolve()