Email2AddressType Property

Microsoft Outlook Visual Basic

Email2AddressType Property

       

Returns or sets a String representing the address type (such as EX or SMTP) of the second e-mail entry for the contact. This is a free-form text field, but it must match the actual type of an existing mail transport. Read/write.

expression.Email2AddressType

expression Required. An expression that returns a ContactItem object.

Example

This Visual Basic for Applications example sets "SMTP" as the address type for the second e-mail entry of a contact.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olContactItem)
myItem.Email2AddressType = "SMTP"

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.Email2AddressType = "SMTP"