UserProperties Interface

Contains UserProperty objects that represent the custom properties of an Outlook item.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<GuidAttribute("0006303D-0000-0000-C000-000000000046")> _
<TypeLibTypeAttribute()> _
<DefaultMemberAttribute("Item")> _
Public Interface UserProperties _
    Inherits IEnumerable
'Usage
Dim instance As UserProperties
[GuidAttribute("0006303D-0000-0000-C000-000000000046")]
[TypeLibTypeAttribute()]
[DefaultMemberAttribute("Item")]
public interface UserProperties : IEnumerable

Remarks

Use the UserProperties property to return the UserProperties object for an Outlook item. This applies to all Outlook items except for the NoteItem.

Use the Add method to create a new UserProperty for an item and add it to the UserProperties object. The Add method allows you to specify a name and type for the new property. When you create a new property, it can also be added as a custom field to the folder that contains the item (using the same name as the property) by setting the AddToFolderFields parameter to True when calling the Add method. That field can then be used as a column in folder views.

Use UserProperties(index), where index is a name or one-based index number, to return a single UserProperty object.

You can use the UserDefinedProperties property of the Folder object to retrieve and examine the definitions of custom item-level properties that a folder can display in a view.

To get or set multiple custom properties, use the PropertyAccessor object instead of the UserProperties object for better performance.

See Also

Reference

UserProperties Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Create a Contact Item

How to: Create a Custom Contact Item

How to: Ensure that Custom Item Properties Are Supported in Folder-Level Queries