UserDefinedProperty interface

Represents the definition of a user-defined property for a Folder object.

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

public interface UserDefinedProperty : _UserDefinedProperty

This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _UserDefinedProperty.

Use UserDefinedProperties(index), where index is a name or index number, to return a single UserDefinedProperty object.

Use the Add method of the UserDefinedProperties collection for a Folder object to define a user-defined property for that folder.

Use the Type property to return the user-defined property type and the DisplayFormat property to return the display format for the user-defined property. If the Type property is set to olCombination or olFormula, use the Formula property to return the formula used to generate values for the user-defined property.

The UserDefinedProperty object represents only the definition of a user-defined property, which is applicable to all Outlook items contained by the folder. To retrieve or change user-defined property values for an Outlook item in that folder, use the UserProperties property of the Outlook item, such as a MailItem object, to retrieve the UserProperties collection for that item. You can then use the UserProperty object for the appropriate user-defined property to retrieve or change the value of that user-defined property for the Outlook item.