UserProperties.Find method (Outlook)

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

Syntax

expression.Find (Name, Custom)

expression A variable that represents a UserProperties object.

Parameters

Name Required/Optional Data type Description
Name Required String The name of the requested property.
Custom Optional Variant True if custom properties on the item should be searched, False if built-in properties should be searched.

Return value

If you use Find to look for a custom property and the call succeeds, it returns a UserProperty object. If it fails, it returns Null (Nothing in Visual Basic).

If you use Find to look for a built-in property, specify False for the Custom parameter. If the call succeeds, it returns the property as a UserProperty object. If the call fails, it returns Null (Nothing in Visual Basic). If you specify True for Custom, the call does not find the built-in property and returns Null (Nothing in Visual Basic).

Remarks

If the Custom parameter is True, only custom user properties are searched. The default value is True. To find a non-custom property such as Subject, specify the Custom parameter as False; otherwise, it returns Nothing.

See also

UserProperties Object

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.