편집

다음을 통해 공유


UserProperties object (Outlook)

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

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.

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.

Example

The following example adds a custom text property named MyPropName to myItem.

Set myProp = myItem.UserProperties.Add("MyPropName", olText)

Methods

Name
Add
Find
Item
Remove

Properties

Name
Application
Class
Count
Parent
Session

See also

UserProperties Object Members Outlook Object Model Reference

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.