Table of contents
Collapse the table of content
Expand the table of content

PickerResults.Add Method (Office)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Adds a PickerResult object to the PickerResults collection.


expression. Add( Id, DisplayName, Type, SIPId, ItemData, SubItems )

expression An expression that returns a PickerResults object.


NameRequired/OptionalData TypeDescription
IdRequiredStringRepresents an identifier of the PickerResult.
DisplayNameRequiredStringRepresents a display name of the PickerResult.
TypeRequiredStringRepresents a type of the PickerResult.
SIPIdOptionalStringCurrently not supported. The SIPId is the identifier for Office Communication Server. It is used only for the people picking scenario.
ItemDataOptionalVariantNon- displaying item binding data
SubItemsOptionalVariantDisplays the purpose or non-display purpose field data of the PickerResult. It is used for passing column values in the Picker Dialog.

Return Value



The following code sets the Picker Dialog properties and then displays the Picker Dialog.

Dim objPickerDialog As PickerDialog 
Dim objPickerProperties As PickerProperties 
Dim objPickerProperty As PickerProperty 
Dim objPickerExistingResults As PickerResults 
Dim objPickerExistingResults As PickerResult 
Dim objPickerResults As PickerResults 

' Configure the Picker Dialog properties. 
Set objPickerDialog = Application.PickerDialog 
objPickerDialog.DataHandlerId = "{000CDF0A-0000-0000-C000-000000000046}" 
objPickerDialog.Title = "Sample Picker Dialog" 
Set objPickerProperties = objPickerDialog.Properties 
Set objPickerProperty = objPickerProperties.Add("SiteUrl", "http://my", msoPickerFieldtypeText) 
Set objPickerExistingResults = objPickerDialog.CreatePickerResults 
Set objPickerExistingResult = objPickerExistingResults.Add("", "John Doe", "User") 

' Show the Picker Dialog and get the results. 
Set objPickerResults = objPickerDialog.Show(True, objPickerExistingResult)

See also


PickerResults Object

Other resources

PickerResults Object Members

© 2018 Microsoft