Share via


Accessing Picklist Items

Picklist items are read-only. You cannot add or remove these items programmatically, but you can read all the possible values for all picklist items by accessing the property, as shown in the sample code that follows:

Return a picklist item from a C# application:

C#

  String value = 
bcmRootFolder.PropertyAccessor.GetProperty("https://schemas.microsoft.com/mapi/proptag/0x6621001f").ToString(); 

Where bcmRootFolder is:

  Folder bcmRootFolder = (Folder)folders["Business Contact Manager"]; 

Return a picklist item from a Visual Basic for Applications (VBA) application:

VBA

  Dim value as String

value = bcmRootFolder.PropertyAccessor.GetProperty("https://schemas.microsoft.com/mapi/proptag/0x6621001f") 

Where bcmRootFolder is:

  Set bcmRootFolder = olFolders("Business Contact Manager") 

See Also

Welcome to the Business Contact Manager for Outlook Developer Guide | 2007 Office System: Updated Developer Content