ItemProperty.Value Property

Outlook Developer Reference

Returns or sets a Variant indicating the value for the specified custom or explicit built-in property. Read/write.

Syntax

expression.Value

expression   A variable that represents an ItemProperty object.

Remarks

Even though ItemProperty.Value allows you to get or set an explicit built-in property or a custom property, you can reference explicit built-in properties directly from the parent object, for example, ContactItem.Body. For more information on accessing properties in Outlook, see Properties Overview.

Example

The following Visual Basic for Applications (VBA) example creates a contact item and sets its Body property

Visual Basic for Applications
  Sub ValueItemProperty()
    Dim cti As Outlook.ContactItem
    Dim itms As Outlook.ItemProperties
    Dim itm As Outlook.ItemProperty
    
    Set cti = Application.CreateItem(olContactItem)
    cti.FullName = "Dan Wilson"
    Set itms = cti.ItemProperties
    Set itm = itms.Item("Body")
    itm.Value = "My friend from school"
    cti.Save
    cti.Display
End Sub

See Also