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

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

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

设置由域标识号指定的资源域的值。Sets the value of a resource field specified by the field identification number.

语法Syntax

表达式SetResourceFieldByID(* * FieldID,* *,* * AllSelectedResources,* *创建,* 资源 Id项目名称)expression. **SetResourceFieldByID( ** FieldID, ** Value, ** AllSelectedResources, ** Create, ** ResourceID, ** ProjectName* )

表达式_返回应用程序对象的表达式。_expression An expression that returns an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
FieldIDFieldID必需RequiredPjFieldPjField字段标识号码。可以指定一个PjField常量或FieldNameToFieldConstant方法所返回的数字资源域中的一个。Field identification number. Can be one of the resource fields specified by a PjField constant or a number returned by the FieldNameToFieldConstant method.
Value必需RequiredStringString资源域的值。The value of the resource field.
AllSelectedResourcesAllSelectedResources可选OptionalBooleanBoolean如此如果字段中的值设置为所有选择的资源。False的值设置为活动的资源。默认值为FalseTrue if the value of the field is set for all selected resources. False if the value is set for the active resource. The default value is False.
创建Create可选OptionalBooleanBoolean如此如果项目应创建资源,如果活动单元格是一个空行。默认值为TrueTrue if Project should create a resource if the active cell is on an empty row. The default value is True.
资源 IdResourceID可选OptionalLongLong包含待设置域的资源标识号。如果 AllSelectedResources 为True,则忽略资源 Id。The identification number of the resource containing the field to set. If AllSelectedResources is True, ResourceID is ignored.
项目名称ProjectName可选OptionalStringString如果活动项目为合并的项目,则指定项目的_资源 Id_指定的资源名称。如果未指定_资源 Id_ ,项目名称_将被忽略。默认值是活动项目的名称。If the active project is a consolidated project, specifies the name of the project for the resource specified by _ResourceID. If ResourceID is not specified, ProjectName is ignored. The default value is the name of the active project.

返回值Return Value

BooleanBoolean

注解Remarks

要按名称设置资源域,请使用SetResourceField方法。To set a resource field by name, use the SetResourceField method.

© 2018 Microsoft