Share via


UserProperties.Find Method

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

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

Syntax

'Declaration
<DispIdAttribute()> _
Function Find ( _
    Name As String, _
    Custom As Object _
) As UserProperty
'Usage
Dim instance As UserProperties
Dim Name As String
Dim Custom As Object
Dim returnValue As UserProperty

returnValue = instance.Find(Name, Custom)
[DispIdAttribute()]
UserProperty Find(
    string Name,
    Object Custom
)

Parameters

  • Custom
    Type: System.Object

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

Return Value

Type: Microsoft.Office.Interop.Outlook.UserProperty
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.

See Also

Reference

UserProperties Interface

UserProperties Members

Microsoft.Office.Interop.Outlook Namespace