Using Named Properties

User-defined named properties may also be specified in place of a predefined property value for the Property property of a format or column object.

You can identify the property with either a string name (such as "NAMED_PROP") or a numeric identifier (such as 0x7E00). If you use a string name, you may omit the GUID of the property set, and the default value is PS_PUBLIC_STRINGS. If you use the numeric identifier, the GUID of the property set is required.

The correct format of the property set GUID is an undelimited byte string, the same format as required by the CDO Fields.Item property.

The following example adds a format for a user-defined property, using the string name for the property.

' Use GUID of property set (excluding delimeters) and string
const AmPidTag_Location = "{EE0392EFA5B91B10ACC100AA00423326} NAMED_PROP" 
Set objFormat = objRenderer.Formats.Add(AmPidTag_Location, Null)
 

The following example adds a format for a user-defined property, using the identifier of the property.

' Use GUID of property set (excluding delimeters) and numeric ID
const AmPidTag_Location = "{EE0392EFA5B91B10ACC100AA00423326} 0x7E00"
Set objFormat = objRenderer.Formats.Add(AmPidTag_Location, Null)
 

For information on property sets and GUIDs, see the MAPI Programmer's Reference.