UserProperties.Find(String, Object) UserProperties.Find(String, Object) Method

Definition

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

public Microsoft.Office.Interop.Outlook.UserProperty Find (string Name, object Custom);
Public Function Find (Name As String, Optional Custom As Object) As UserProperty

Parameters

Name
String String

The name of the requested property.

Custom
Object Object

True if custom properties on the item should be searched, False if built-in properties should be searched.

Returns

If you use UserProperties.Find to look for a custom property and the call succeeds, it will return a UserProperty object. If it fails, it will return Nothing (a null reference (Nothing in Visual Basic) in C#). If you use UserProperties.Find to look for a built-in property, specify False for the Custom parameter. If the call succeeds, it will return the property as a UserProperty object. If the call fails, it will return Nothing (a null reference (Nothing in Visual Basic) in C#). If you specify True for Custom, the call will not find the built-in property and will return Nothing (a null reference (Nothing in Visual Basic) in C#).

Remarks

If Custom parameter is True, only custom user properties will be searched. The default value is True. To find a non custom property such as Subject, specify Custom parameter as False, otherwise will return Nothing.

Applies to