UserProperties Interface

Definition

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

public interface class UserProperties : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("0006303D-0000-0000-C000-000000000046")]
public interface UserProperties : System.Collections.IEnumerable
Public Interface UserProperties
Implements IEnumerable
Attributes
Implements

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(String, OlUserPropertyType, Object, Object) 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.

Properties

Application

Returns an Application object that represents the parent Outlook application for the object. Read-only.

Class

Returns an OlObjectClass constant indicating the object's class. Read-only.

Count

Returns an Integer (int in C#) value indicating the count of objects in the specified collection. Read-only.

Item[Object]

Returns a UserProperty object from the collection.

Parent

Returns the parent Object of the specified object. Read-only.

Session

Returns the NameSpace object for the current session. Read-only.

Methods

Add(String, OlUserPropertyType, Object, Object)

Creates a new user property in the UserProperties collection.

Find(String, Object)

Locates and returns a UserProperty object for the requested property name, if it exists.

Remove(Int32)

Removes an object from the collection.

Applies to