Add Method (UserProperties Collection) Example

This Visual Basic for Applications example creates a new ContactItem object and adds "LastDateSpokenWith" as a user property.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olContactItem)
Set myUserProperty = myItem.UserProperties _
    .Add("LastDateSpokenWith", olDateTime)

This Visual Basic for Applications example creates a new ContactItem object and adds "Notes" as a user property. The Value is set by accessing the index of the new property.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olContactItem)
Set myUserProperty = myItem.UserProperties _
    .Add("Notes", olText)
myItem.UserProperties(1).Value = "Neighbor"