Add Method (Recipients Collection) Example

This Visual Basic for Applications example creates a new mail message, uses the Add method to add "Allison Klein" as a To recipient, and displays the message.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myRecipient = myItem.Recipients.Add("Allison Klein")
myItem.Display

If you use VBScript, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript.

Set myItem = Application.CreateItem(0)
Set myRecipient = myItem.Recipients.Add("Allison Klein")
myItem.Display