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

Application.Find 方法 (项目)Application.Find Method (Project)

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

搜索未筛选的值;如果找到该值,则返回TrueSearches for an unfiltered value; returns True if the value is found.

语法Syntax

表达式expression.查找字段测试下一步MatchCaseFieldIDTestIDFind (Field, Test, Value, Next, MatchCase, FieldID, TestID)

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
字段Field可选OptionalStringString要搜索的域的名称。The name of the field to search.
测试Test可选OptionalStringString字段与值之间进行比较的类型。The type of comparison made between Field and Value.可以比较字符串之一。Can be one of the comparison strings.
ValueValue可选OptionalStringString要与指定字段的字段进行比较的值。The value to compare with the field specified by Field.
NextNext可选OptionalBooleanBoolean如此如果项目向下搜索下一处匹配搜索条件的值。True if Project searches down for the next occurrence of a value that matches the search criteria.如果项目搜索功能的下一个匹配项。False if Project searches up for the next occurrence.默认值为TrueThe default value is True.
MatchCaseMatchCase可选OptionalBooleanBoolean搜索条件要区分大小写。True if the search is case-sensitive.默认值为FalseThe default value is False.
FieldIDFieldID可选OptionalVariantVariant字段标识号码可以是PjField常量之一。The field identification number can be one of the PjField constants.FieldID 将优先于任何字段值。FieldID takes precedence over any Field value.
TestIDTestID可选OptionalVariantVariant测试标识号码可以是PjComparison常量之一。The test identification number can be one of the PjComparison constants.TestID 将优先于任何测试的值。TestID takes precedence over any Test value.


比较字符串Comparison strings

比较字符串Comparison string说明Description
"equals""equals"字段_的值等于_值The value of Field equals Value.
"does not equal""does not equal"字段_的值不等于_值The value of Field does not equal Value.
"is greater than""is greater than"字段_的值大于_的值The value of Field is greater than Value.
"is greater than or equal to""is greater than or equal to"字段_的值是大于或等于_值The value of Field is greater than or equal to Value.
"is less than""is less than"字段_的值小于_值The value of Field is less than Value.
"is less than or equal to""is less than or equal to"字段_的值小于或等于_值The value of Field is less than or equal to Value.
"is within""is within"中_值_是_字段_的值。The value of Field is within Value.
"is not within""is not within"字段_的值不_值_中。The value of _Field is not within Value.
"contains""contains"字段_包含_值Field contains Value.
"does not contain""does not contain"字段_不包含_值Field does not contain Value.
"contains exactly""contains exactly"字段_包含完全相同的_值Field contains exactly Value.


返回值Return value

BooleanBoolean

备注Remarks

使用Find方法不带任何参数,或者没有指定字段、 测试和值,显示已设置为以前的状态选项查找对话框。Using the Find method with no arguments, or without specifying Field, Test, and Value, displays the Find dialog box that has options set for the previous state.

要查找的值,您可以搜索所有可用的字段,使用FindEx方法。To find a value where you can search all available fields, use the FindEx method.

示例Example

下例中的任一语句查找下一个优先级等于 600 的任务。Either statement in the following example finds the next task with priority = 600.

Sub FindFieldByPriority 
 Find Field:="Priority", Test:="equals", Value:="600" 
 Find Field:="xx", Test:="xx", FieldID:=pjTaskPriority, TestID:=pjCompareEquals, Value:="600" 
End Sub
© 2018 Microsoft