Email2Address Property Example

This Visual Basic for Applications example sets "Jsmith@msn.com" as the e-mail address for the second e-mail entry of a contact.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olContactItem)
myItem.Email2Address = "someone@microsoft.com"

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(2)
myItem.Email2Address = "someone@microsoft.com"