Table of contents
TOC
折叠目录
展开目录

PickerResults.Count 属性 (办公室)PickerResults.Count Property (Office)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

检索的PickerResultPickerResults集合中包含的对象的数目的计数。只读的Retrieves the count of the number of PickerResult objects contained within the PickerResults collection. Read-only

语法Syntax

表达式计数expression. Count

表达式_该表达式返回一个PickerResults对象。_expression An expression that returns a PickerResults object.

示例Example

下面的代码显示选取器对话框用户界面,获取结果,然后枚举这些结果。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

另请参阅See also

概念Concepts

PickerResults 对象PickerResults Object

其他资源Other resources

PickerResults 对象成员PickerResults Object Members

© 2018 Microsoft