UserDefinedProperties Interface

Contains a set of UserDefinedProperty objects representing the user-defined properties defined for a Folder object.

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

Syntax

'Declaration
<CoClassAttribute(GetType(UserDefinedPropertiesClass))> _
<GuidAttribute("00063047-0000-0000-C000-000000000046")> _
Public Interface UserDefinedProperties _
    Inherits _UserDefinedProperties
'Usage
Dim instance As UserDefinedProperties
[CoClassAttribute(typeof(UserDefinedPropertiesClass))]
[GuidAttribute("00063047-0000-0000-C000-000000000046")]
public interface UserDefinedProperties : _UserDefinedProperties

Remarks

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 _UserDefinedProperties.

The members of the UserDefinedProperties collection correspond to the fields under User-defined fields in folder that you get in the Show Fields dialog.

Use the UserDefinedProperties property to retrieve the UserDefinedProperties object from a Folder object.

Use the Add method to define and add a user-defined property to, and the Remove method to remove an existing user-defined property from, the UserDefinedProperties collection. Use the Item property (this in C#) to retrieve by name or index, or the Find method to locate and retrieve by name, a UserDefinedProperty object from the UserDefinedProperties collection. Use the Refresh method to reload the UserDefinedProperties collection from the store.

The UserDefinedProperties collection contains only the definitions of user-defined properties, which are 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.

See Also

Reference

UserDefinedProperties Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

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