Table of contents
TOC
Recolher sumário
Expandir sumário

Propriedade PickerResults.Count (Office)PickerResults.Count Property (Office)

office 365 dev account|Última Atualização: 22/03/2018
|
2 Colaboradores

Recupera a contagem do número de objetos PickerResult contida na coleção PickerResults . Somente leituraRetrieves the count of the number of PickerResult objects contained within the PickerResults collection. Read-only

SintaxeSyntax

expressão. Contagemexpression. Count

expressão Uma expressão que retorna um objeto PickerResults .expression An expression that returns a PickerResults object.

ExemploExample

O código a seguir exibe a interface do usuário do diálogo de seleção, obtém os resultados e os enumera.The following code displays the Picker Dialog user interface, gets results, and then enumerates those results.

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("johndoe@contoso.com", "John Doe", "User") 

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

' Enumerate the results. 
For index = 1 To objPickerResults.Count-1 
 Debug.Print objPickerResults.Item(index).Id 
 Debug.Print objPickerResults.Item(index).DisplayName 
 Debug.Print objPickerResults.Item(index).Type 
 Debug.Print objPickerResults.Item(index).SIPId 
Next

Ver tambémSee also

ConceitosConcepts

Objeto PickerResultsPickerResults Object

Outros recursosOther resources

Membros do objeto PickerResultsPickerResults Object Members

© 2018 Microsoft