Share via


CustomOutlineCodeEdit Method

Edits a custom outline code definition.

Syntax

expression**.CustomOutlineCodeEdit(FieldID, Level, Sequence, Length, Separator, OnlyLookUpTableCodes, OnlyCompleteCodes, LookupTableLink, OnlyLeaves, MatchGeneric, RequiredCode)**

*expression   *     Optional. An expression that returns an Application object.

PjCustomField

pjCustomProjectEntCost1-10 pjCustomResourceOutlineCode1-10
pjCustomProjectEntDate1-30 pjCustomResourceStart1-10
pjCustomProjectEntDuration1-10 pjCustomResourceText1-30
pjCustomProjectEntFlag1-20 pjCustomTaskCost1-10
pjCustomProjectEntNumber1-40 pjCustomTaskDate1-10
pjCustomProjectEntOutlineCode1-30 pjCustomTaskDuration1-10
pjCustomProjectEntText1-40 pjCustomTaskEntCost1-10
pjCustomResourceCost1-10 pjCustomTaskEntDate1-30
pjCustomResourceDate1-10 pjCustomTaskEntDuration1-10
pjCustomResourceDuration1-10 pjCustomTaskEntFlag1-20
pjCustomResourceEntCost1-10 pjCustomTaskEntNumber1-40
pjCustomResourceEntDate1-30 pjCustomTaskEntOutlineCode1-30
pjCustomResourceEntDuration1-10 pjCustomTaskEntText1-40
pjCustomResourceEntFlag1-20 pjCustomTaskFinish1-10
pjCustomResourceEntNumber1-40 pjCustomTaskFlag1-20
pjCustomResourceEntOutlineCode1-30 pjCustomTaskNumber1-20
pjCustomResourceEntText1-40 pjCustomTaskOutlineCode1-10
pjCustomResourceFinish1-10 pjCustomTaskStart1-10
pjCustomResourceFlag1-20 pjCustomTaskText1-30
pjCustomResourceNumber1-20  

Level    Optional Long. The level of code mask to edit. The default value is one greater than the highest level currently specified for the field.

Sequence    Optional Long. The sequence for the level specified in Level. Can be one of the following PjCustomOutlineCodeSequence constants: pjCustomOutlineCodeCharacters, pjCustomOutlineCodeLowercaseLetters, pjCustomOutlineCodeNumbers, or pjCustomOutlineCodeUppercaseLetters. The default value is pjCustomOutlineCodeNumbers.

Length    Optional Variant. Specifies the length for a given level. Can be the string "Any" or an integer value 1 -255. The default value is "Any".

Separator    Optional String. The character that separates the level specified in Level from the next. Can be one of ".", "-", "+", or "/". The default value is ".".

OnlyLookUpTableCodes    Optional Boolean. True if only codes listed in the lookup table can be used. The default value is False.

OnlyCompleteCodes    Optional Boolean. True if only codes with values at all levels of the mask can be used. The default value is False.

LookupTableLink    Optional Code. A binary value that represents another outline code. If LookupTableLink is omitted, it will be assumed that no code alias is desired.

OnlyLeaves    Optional Boolean. True if only outline code values without children can be selected.

MatchGeneric    Optional Boolean. True if Microsoft Office Project 2003 uses this code as an outline code in the Resource Substitution Wizard.

RequiredCode    Optional Boolean. True if the outline code must be present before save is allowed.

Remarks

If only the FieldID argument is specified, the CustomOutlineCodeEdit method brings up the Custom Outline Code Definition dialog box for the specified custom outline code.

The LookupTableLink, OnlyLeaves, MatchGeneric, and RequiredCode arguments are only available in Microsoft Office Project Professional   2003.

Example

This example creates a two-level outline code for tasks. Using the default values for the method, the first line specifies that the first level uses two-digit codes, sorted by number, and is separated from the next level by the "-" character. The second line specifies that uppercase letters, sorted alphabetically, are used for the second level and are separated from the next level by the default "." character. It also specifies that only two-level codes may be used.

Sub CreateCustOutlineCode()
    Application.CustomOutlineCodeEdit pjCustomTaskOutlineCode1, Length:=2, _
        Separator:="-"
    Application.CustomOutlineCodeEdit pjCustomTaskOutlineCode1, Length:=1, _
        Sequence:=pjCustomOutlineCodeUppercaseLetters, OnlyCompleteCodes:=True
End Sub

Applies to | Application Object

See Also | EnterpriseCustomOutlineCodeShare Method | LookUpTableAdd Method | OutlineLevel Property | OutlineNumber Property | OutlineShowAllTasks Method | OutlineShowSubtasks Method | OutlineShowTasks Method