(Contents)(Previous)(Next)

AddRecipient(sRecipient As String)

Description: Adds one or more recipients to the message

Syntax: object.AddRecipient(sRecipient)

Parameters: object - Required, the Message object

sRecipient - The address or name of the recipient.

Remarks: This method adds one or more recipients to the message prior to sending. If one or more of the passed in recipient names or addresses does not uniquely identify a person held within the OfficeTalk address book then a Check Names dialog box is shown requiring you to select the appropriate recipient from a list of matches. You may specify more than one recipient by separating each recipient with a semi-colon character, ';', e.g. "John;Paul;Susan"

Returns: Returns True if all recipients were uniquely identified and were added to the message, False otherwise.

Example:

Dim session As Object

Set session = CreateObject("OfficeTalk.Session")

Call session.Logon(login name, password)

Set message = session.NewMessage

if (message.AddRecipient("John")) Then

MsgBox "Successfully added recipient"

End If


Next