任务对象 (项目)Task object (Project)

代表一个任务。Represents a task. 任务对象是**Tasks** 集合的一个成员。The Task object is a member of the Tasks collection. 使用任务对象使用任务(索引), 其中_索引_是任务索引号或任务名称, 返回单个任务对象。Using the Task Object Use Tasks (index), where index is the task index number or task name, to return a single Task object. 下面的示例打印分配给活动项目中每个任务的资源的名称。The following example prints the name of every resource assigned to every task in the active project. 使用 Tasks 集合使用**tasks** 属性返回一个Tasks集合。Using the Tasks Collection Use the Tasks property to return a Tasks collection. 下面的示例显示选定内容中的每个任务的名称。The following example displays the name of every task in the selection. 使用**add** 方法可将Task对象添加到Tasks集合。Use the Add method to add a Task object to the Tasks collection. 以下示例将一个新任务添加到任务列表的末尾。The following example adds a new task to the end of the task list.

方法Methods

名称Name
AppendNotesAppendNotes
删除Delete
GetFieldGetField
LinkPredecessorsLinkPredecessors
LinkSuccessorsLinkSuccessors
OutlineHideSubTasksOutlineHideSubTasks
OutlineIndentOutlineIndent
OutlineOutdentOutlineOutdent
OutlineShowAllTasksOutlineShowAllTasks
OutlineShowSubTasksOutlineShowSubTasks
SetFieldSetField
SplitSplit
TimeScaleDataTimeScaleData
UnlinkPredecessorsUnlinkPredecessors
UnlinkSuccessorsUnlinkSuccessors

属性Properties

名称Name
ActiveActive
ActualCostActualCost
ActualDurationActualDuration
ActualFinishActualFinish
ActualOvertimeCostActualOvertimeCost
ActualOvertimeWorkActualOvertimeWork
ActualStartActualStart
ActualWorkActualWork
ACWPACWP
应用程序Application
作业Assignments
Baseline10BudgetCostBaseline10BudgetCost
Baseline10BudgetWorkBaseline10BudgetWork
Baseline10CostBaseline10Cost
Baseline10DeliverableFinishBaseline10DeliverableFinish
Baseline10DeliverableStartBaseline10DeliverableStart
Baseline10DurationBaseline10Duration
Baseline10DurationEstimatedBaseline10DurationEstimated
Baseline10DurationTextBaseline10DurationText
Baseline10FinishBaseline10Finish
Baseline10FinishTextBaseline10FinishText
Baseline10FixedCostBaseline10FixedCost
Baseline10FixedCostAccrualBaseline10FixedCostAccrual
Baseline10StartBaseline10Start
Baseline10StartTextBaseline10StartText
Baseline10WorkBaseline10Work
Baseline1BudgetCostBaseline1BudgetCost
Baseline1BudgetWorkBaseline1BudgetWork
Baseline1CostBaseline1Cost
Baseline1DeliverableFinishBaseline1DeliverableFinish
Baseline1DeliverableStartBaseline1DeliverableStart
Baseline1DurationBaseline1Duration
Baseline1DurationEstimatedBaseline1DurationEstimated
Baseline1DurationTextBaseline1DurationText
Baseline1FinishBaseline1Finish
Baseline1FinishTextBaseline1FinishText
Baseline1FixedCostBaseline1FixedCost
Baseline1FixedCostAccrualBaseline1FixedCostAccrual
Baseline1StartBaseline1Start
Baseline1StartTextBaseline1StartText
Baseline1WorkBaseline1Work
Baseline2BudgetCostBaseline2BudgetCost
Baseline2BudgetWorkBaseline2BudgetWork
Baseline2CostBaseline2Cost
Baseline2DeliverableFinishBaseline2DeliverableFinish
Baseline2DeliverableStartBaseline2DeliverableStart
Baseline2DurationBaseline2Duration
Baseline2DurationEstimatedBaseline2DurationEstimated
Baseline2DurationTextBaseline2DurationText
Baseline2FinishBaseline2Finish
Baseline2FinishTextBaseline2FinishText
Baseline2FixedCostBaseline2FixedCost
Baseline2FixedCostAccrualBaseline2FixedCostAccrual
Baseline2StartBaseline2Start
Baseline2StartTextBaseline2StartText
Baseline2WorkBaseline2Work
Baseline3BudgetCostBaseline3BudgetCost
Baseline3BudgetWorkBaseline3BudgetWork
Baseline3CostBaseline3Cost
Baseline3DeliverableFinishBaseline3DeliverableFinish
Baseline3DeliverableStartBaseline3DeliverableStart
Baseline3DurationBaseline3Duration
Baseline3DurationEstimatedBaseline3DurationEstimated
Baseline3DurationTextBaseline3DurationText
Baseline3FinishBaseline3Finish
Baseline3FinishTextBaseline3FinishText
Baseline3FixedCostBaseline3FixedCost
Baseline3FixedCostAccrualBaseline3FixedCostAccrual
Baseline3StartBaseline3Start
Baseline3StartTextBaseline3StartText
Baseline3WorkBaseline3Work
Baseline4BudgetCostBaseline4BudgetCost
Baseline4BudgetWorkBaseline4BudgetWork
Baseline4CostBaseline4Cost
Baseline4DeliverableFinishBaseline4DeliverableFinish
Baseline4DeliverableStartBaseline4DeliverableStart
Baseline4DurationBaseline4Duration
Baseline4DurationEstimatedBaseline4DurationEstimated
Baseline4DurationTextBaseline4DurationText
Baseline4FinishBaseline4Finish
Baseline4FinishTextBaseline4FinishText
Baseline4FixedCostBaseline4FixedCost
Baseline4FixedCostAccrualBaseline4FixedCostAccrual
Baseline4StartBaseline4Start
Baseline4StartTextBaseline4StartText
Baseline4WorkBaseline4Work
Baseline5BudgetCostBaseline5BudgetCost
Baseline5BudgetWorkBaseline5BudgetWork
Baseline5CostBaseline5Cost
Baseline5DeliverableFinishBaseline5DeliverableFinish
Baseline5DeliverableStartBaseline5DeliverableStart
Baseline5DurationBaseline5Duration
Baseline5DurationEstimatedBaseline5DurationEstimated
Baseline5DurationTextBaseline5DurationText
Baseline5FinishBaseline5Finish
Baseline5FinishTextBaseline5FinishText
Baseline5FixedCostBaseline5FixedCost
Baseline5FixedCostAccrualBaseline5FixedCostAccrual
Baseline5StartBaseline5Start
Baseline5StartTextBaseline5StartText
Baseline5WorkBaseline5Work
Baseline6BudgetCostBaseline6BudgetCost
Baseline6BudgetWorkBaseline6BudgetWork
Baseline6CostBaseline6Cost
Baseline6DeliverableFinishBaseline6DeliverableFinish
Baseline6DeliverableStartBaseline6DeliverableStart
Baseline6DurationBaseline6Duration
Baseline6DurationEstimatedBaseline6DurationEstimated
Baseline6DurationTextBaseline6DurationText
Baseline6FinishBaseline6Finish
Baseline6FinishTextBaseline6FinishText
Baseline6FixedCostBaseline6FixedCost
Baseline6FixedCostAccrualBaseline6FixedCostAccrual
Baseline6StartBaseline6Start
Baseline6StartTextBaseline6StartText
Baseline6WorkBaseline6Work
Baseline7BudgetCostBaseline7BudgetCost
Baseline7BudgetWorkBaseline7BudgetWork
Baseline7CostBaseline7Cost
Baseline7DeliverableFinishBaseline7DeliverableFinish
Baseline7DeliverableStartBaseline7DeliverableStart
Baseline7DurationBaseline7Duration
Baseline7DurationEstimatedBaseline7DurationEstimated
Baseline7DurationTextBaseline7DurationText
Baseline7FinishBaseline7Finish
Baseline7FinishTextBaseline7FinishText
Baseline7FixedCostBaseline7FixedCost
Baseline7FixedCostAccrualBaseline7FixedCostAccrual
Baseline7StartBaseline7Start
Baseline7StartTextBaseline7StartText
Baseline7WorkBaseline7Work
Baseline8BudgetCostBaseline8BudgetCost
Baseline8BudgetWorkBaseline8BudgetWork
Baseline8CostBaseline8Cost
Baseline8DeliverableFinishBaseline8DeliverableFinish
Baseline8DeliverableStartBaseline8DeliverableStart
Baseline8DurationBaseline8Duration
Baseline8DurationEstimatedBaseline8DurationEstimated
Baseline8DurationTextBaseline8DurationText
Baseline8FinishBaseline8Finish
Baseline8FinishTextBaseline8FinishText
Baseline8FixedCostBaseline8FixedCost
Baseline8FixedCostAccrualBaseline8FixedCostAccrual
Baseline8StartBaseline8Start
Baseline8StartTextBaseline8StartText
Baseline8WorkBaseline8Work
Baseline9BudgetCostBaseline9BudgetCost
Baseline9BudgetWorkBaseline9BudgetWork
Baseline9CostBaseline9Cost
Baseline9DeliverableFinishBaseline9DeliverableFinish
Baseline9DeliverableStartBaseline9DeliverableStart
Baseline9DurationBaseline9Duration
Baseline9DurationEstimatedBaseline9DurationEstimated
Baseline9DurationTextBaseline9DurationText
Baseline9FinishBaseline9Finish
Baseline9FinishTextBaseline9FinishText
Baseline9FixedCostBaseline9FixedCost
Baseline9FixedCostAccrualBaseline9FixedCostAccrual
Baseline9StartBaseline9Start
Baseline9StartTextBaseline9StartText
Baseline9WorkBaseline9Work
BaselineBudgetCostBaselineBudgetCost
BaselineBudgetWorkBaselineBudgetWork
BaselineCostBaselineCost
BaselineDeliverableFinishBaselineDeliverableFinish
BaselineDeliverableStartBaselineDeliverableStart
BaselineDurationBaselineDuration
BaselineDurationEstimatedBaselineDurationEstimated
BaselineDurationTextBaselineDurationText
BaselineFinishBaselineFinish
BaselineFinishTextBaselineFinishText
BaselineFixedCostBaselineFixedCost
BaselineFixedCostAccrualBaselineFixedCostAccrual
BaselineStartBaselineStart
BaselineStartTextBaselineStartText
BaselineWorkBaselineWork
BCWPBCWP
BCWSBCWS
BudgetCostBudgetCost
BudgetWorkBudgetWork
日历Calendar
CalendarGuidCalendarGuid
CalendarObjectCalendarObject
确认Confirmed
ConstraintDateConstraintDate
ConstraintTypeConstraintType
联系人Contact
成本Cost
Cost1Cost1
Cost10Cost10
Cost2Cost2
Cost3Cost3
Cost4Cost4
Cost5Cost5
Cost6Cost6
Cost7Cost7
Cost8Cost8
Cost9Cost9
CostVarianceCostVariance
CPICPI
已创建Created
关键Critical
CVCV
CVPercentCVPercent
Date1Date1
Date10Date10
Date2Date2
Date3Date3
Date4Date4
Date5Date5
Date6Date6
Date7Date7
Date8Date8
Date9Date9
截止日期Deadline
DeliverableFinishDeliverableFinish
DeliverableGuidDeliverableGuid
DeliverableNameDeliverableName
DeliverableStartDeliverableStart
DeliverableTypeDeliverableType
DurationDuration
Duration1Duration1
Duration10Duration10
Duration10EstimatedDuration10Estimated
Duration1EstimatedDuration1Estimated
Duration2Duration2
Duration2EstimatedDuration2Estimated
Duration3Duration3
Duration3EstimatedDuration3Estimated
Duration4Duration4
Duration4EstimatedDuration4Estimated
Duration5Duration5
Duration5EstimatedDuration5Estimated
Duration6Duration6
Duration6EstimatedDuration6Estimated
Duration7Duration7
Duration7EstimatedDuration7Estimated
Duration8Duration8
Duration8EstimatedDuration8Estimated
Duration9Duration9
Duration9EstimatedDuration9Estimated
DurationTextDurationText
DurationVarianceDurationVariance
EACEAC
EarlyFinishEarlyFinish
EarlyStartEarlyStart
EarnedValueMethodEarnedValueMethod
EffortDrivenEffortDriven
ErrorMessageErrorMessage
估计Estimated
ExternalTaskExternalTask
FinishFinish
Finish1Finish1
Finish10Finish10
Finish2Finish2
Finish3Finish3
Finish4Finish4
Finish5Finish5
Finish6Finish6
Finish7Finish7
Finish8Finish8
Finish9Finish9
FinishSlackFinishSlack
FinishTextFinishText
FinishVarianceFinishVariance
FixedCostFixedCost
FixedCostAccrualFixedCostAccrual
Flag1Flag1
Flag10Flag10
Flag11Flag11
Flag12Flag12
Flag13Flag13
Flag14Flag14
Flag15Flag15
Flag16Flag16
Flag17Flag17
Flag18Flag18
Flag19Flag19
Flag2Flag2
Flag20Flag20
Flag3Flag3
Flag4Flag4
Flag5Flag5
Flag6Flag6
Flag7Flag7
Flag8Flag8
Flag9Flag9
FreeSlackFreeSlack
GroupBySummaryGroupBySummary
GuidGuid
HideBarHideBar
HyperlinkHyperlink
HyperlinkAddressHyperlinkAddress
HyperlinkHREFHyperlinkHREF
HyperlinkScreenTipHyperlinkScreenTip
HyperlinkSubAddressHyperlinkSubAddress
IDID
IgnoreResourceCalendarIgnoreResourceCalendar
IgnoreWarningsIgnoreWarnings
索引Index
IsDurationValidIsDurationValid
IsFinishValidIsFinishValid
IsPublishedIsPublished
IsStartValidIsStartValid
LateFinishLateFinish
LateStartLateStart
LevelIndividualAssignmentsLevelIndividualAssignments
LevelingCanSplitLevelingCanSplit
LevelingDelayLevelingDelay
LinkedFieldsLinkedFields
手动Manual
标记为Marked
里程碑Milestone
名称Name
备注Notes
Number1Number1
Number10Number10
Number11Number11
Number12Number12
Number13Number13
Number14Number14
Number15Number15
Number16Number16
Number17Number17
Number18Number18
Number19Number19
Number2Number2
Number20Number20
Number3Number3
Number4Number4
Number5Number5
Number6Number6
Number7Number7
Number8Number8
Number9Number9
对象Objects
OutlineChildrenOutlineChildren
OutlineCode1OutlineCode1
OutlineCode10OutlineCode10
OutlineCode2OutlineCode2
OutlineCode3OutlineCode3
OutlineCode4OutlineCode4
OutlineCode5OutlineCode5
OutlineCode6OutlineCode6
OutlineCode7OutlineCode7
OutlineCode8OutlineCode8
OutlineCode9OutlineCode9
OutlineLevelOutlineLevel
OutlineNumberOutlineNumber
OutlineParentOutlineParent
过度分配Overallocated
OvertimeCostOvertimeCost
OvertimeWorkOvertimeWork
ParentParent
PathDrivenSuccessorPathDrivenSuccessor
PathDrivingPredecessorPathDrivingPredecessor
PathPredecessorPathPredecessor
PathSuccessorPathSuccessor
PercentCompletePercentComplete
PercentWorkCompletePercentWorkComplete
PhysicalPercentCompletePhysicalPercentComplete
占位符Placeholder
前置任务Predecessors
PredecessorTasksPredecessorTasks
PreleveledFinishPreleveledFinish
PreleveledStartPreleveledStart
优先级Priority
项目Project
RecalcFlagsRecalcFlags
定期Recurring
RegularWorkRegularWork
RemainingCostRemainingCost
RemainingDurationRemainingDuration
RemainingOvertimeCostRemainingOvertimeCost
RemainingOvertimeWorkRemainingOvertimeWork
RemainingWorkRemainingWork
ResourceGroupResourceGroup
ResourceInitialsResourceInitials
ResourceNamesResourceNames
ResourcePhoneticsResourcePhonetics
资源Resources
ResponsePendingResponsePending
简历Resume
汇总Rollup
ScheduledDurationScheduledDuration
ScheduledFinishScheduledFinish
ScheduledStartScheduledStart
SPISPI
SplitPartsSplitParts
StartStart
Start1Start1
Start10Start10
Start2Start2
Start3Start3
Start4Start4
Start5Start5
Start6Start6
Start7Start7
Start8Start8
Start9Start9
StartDriverStartDriver
StartSlackStartSlack
StartTextStartText
StartVarianceStartVariance
状态Status
StatusManagerNameStatusManagerName
停止Stop
子项目Subproject
SubProjectReadOnlySubProjectReadOnly
后续任务Successors
SuccessorTasksSuccessorTasks
摘要Summary
SVSV
SVPercentSVPercent
TaskDependenciesTaskDependencies
TCPITCPI
TeamStatusPendingTeamStatusPending
Text1Text1
Text10Text10
Text11Text11
Text12Text12
Text13Text13
Text14Text14
Text15Text15
Text16Text16
Text17Text17
Text18Text18
Text19Text19
Text2Text2
Text20Text20
Text21Text21
Text22Text22
Text23Text23
Text24Text24
Text25Text25
Text26Text26
Text27Text27
Text28Text28
Text29Text29
Text3Text3
Text30Text30
Text4Text4
Text5Text5
Text6Text6
Text7Text7
Text8Text8
Text9Text9
TotalSlackTotalSlack
类型Type
UniqueIDUniqueID
UniqueIDPredecessorsUniqueIDPredecessors
UniqueIDSuccessorsUniqueIDSuccessors
UpdateNeededUpdateNeeded
VACVAC
警告Warning
WBSWBS
WBSPredecessorsWBSPredecessors
WBSSuccessorsWBSSuccessors
工作Work
WorkVarianceWorkVariance
符合标准Compliant

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.