UserDefinedProperties.Add Method
Outlook Developer Reference |
Creates a new UserDefinedProperty object and appends it to the collection.
Version Information
Version Added: Outlook 2007
Syntax
expression.Add(Name, Type, DisplayFormat, Formula)
expression A variable that represents a UserDefinedProperties object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Name | Required | String | The name of the new user-defined property. |
Type | Required | OlUserPropertyType | The type of the new user-defined property. |
DisplayFormat | Optional | Variant | The display format of the new user-defined property. This parameter can be set to a value from one of several different enumerations, determined by the OlUserPropertyType constant specified in the Type parameter. For more information on how Type and DisplayFormat interact, see DisplayFormat Property. |
Formula | Optional | Variant | The formula used to calculate values for the new user-defined property. This parameter is ignored if the Type parameter is set to any value other than olCombination or olFormula. |
Return Value
A UserDefinedProperty object that represents the new user-defined property.
Example
The following Visual Basic for Applications (VBA) example uses the Add method to create and add several UserDefinedProperty objects to the Inbox default folder.
Visual Basic for Applications |
---|
|
See Also