Compartilhar via


Value Property

Returns or sets a Variant indicating the value for the specified user or item property. Read/write.

expression**.Value**

*expression    * Required. An expression that returns one of the objects in the Applies To list.

Example

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

Sub ValueItemProperty()
    Dim outApp As New Outlook.Application
    Dim cti As Outlook.ContactItem
    Dim itms As Outlook.ItemProperties
    Dim itm As Outlook.ItemProperty
    
    Set cti = outApp.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

Applies to | ItemProperty Object | UserProperty Object