Share via


Application.TextStyles Method

Project Developer Reference

Sets the text styles for tasks and resources in the active view.

Syntax

expression.TextStyles(Item, Font, Size, Bold, Italic, Underline, Color, CellColor, Pattern)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Item Optional Long The type of text to change. Can be one of the following PjTextItem constants. If the Gantt Chart is active:
pjAllpjGanttMajorTimescale
pjNoncriticalpjGanttMinorTimescale
pjCriticalpjBarTextLeft
pjMilestonepjBarTextRight
pjSummarypjBarTextTop
pjProjectSummarypjBarTextBottom
pjMarkedpjBarTextInside
pjTaskFilterHighlightpjGanttExternalTask
pjTaskRowColumnTitles
If the Task Usage view is active:
pjAllpjTaskFilterHighlight
pjCriticalpjTaskMajorTimescale
pjMarkedpjTaskMinorTimescale
pjMilestonepjTaskRowColumnTitles
pjNoncriticalpjTaskUsageAssignmentRow
pjProjectSummarypjTaskUsageExternalTask
pjSummary
If the Task Sheet is active:
pjAllpjProjectSummary
pjCriticalpjSummary
pjMarkedpjTaskSheetExternalTask
pjMilestonepjTaskFilterHighlight
pjNoncriticalpjTaskRowColumnTitles
If the Resource Graph view is active: pjAll, pjAllocated, pjOverallocated, pjGraphMajorTimescale, pjGraphMinorTimescale, pjTickLabels, or pjLegendLabels. If the Resource Usage view is active: pjAll, pjAllocated, pjOverallocated, pjResourceFilterHighlight, pjResourceRowColumnTitles, pjResourceMajorTimescale, pjResourceMinorTimescale, or pjResourceUsageAssignmentRow. If the Resource Sheet is active: pjAll, pjAllocated, pjOverallocated, pjResourceFilterHightlight, or pjResourceRowColumnTitles.
pjAll pjGanttMajorTimescale
pjNoncritical pjGanttMinorTimescale
pjCritical pjBarTextLeft
pjMilestone pjBarTextRight
pjSummary pjBarTextTop
pjProjectSummary pjBarTextBottom
pjMarked pjBarTextInside
pjTaskFilterHighlight pjGanttExternalTask
pjTaskRowColumnTitles
pjAll pjTaskFilterHighlight
pjCritical pjTaskMajorTimescale
pjMarked pjTaskMinorTimescale
pjMilestone pjTaskRowColumnTitles
pjNoncritical pjTaskUsageAssignmentRow
pjProjectSummary pjTaskUsageExternalTask
pjSummary
pjAll pjProjectSummary
pjCritical pjSummary
pjMarked pjTaskSheetExternalTask
pjMilestone pjTaskFilterHighlight
pjNoncritical pjTaskRowColumnTitles
Font Optional String The name of the font. The Font argument is ignored if the active view is the Network Diagram and Item is not pjAll.
Size Optional Integer The size of the font in points. The Size argument is ignored if the active view is the Network Diagram and Item is not pjAll.
Bold Optional Boolean True if the font is bold.
Italic Optional Boolean True if the font is italic.
Underline Optional Boolean True if the font is underlined.
Color Optional Long The color of the font. Can be one of the following PjColor constants:
pjColorAutomaticpjNavy
pjAquapjOlive
pjBlackpjPurple
pjBluepjRed
pjFuchsiapjSilver
pjGraypjTeal
pjGreenpjYellow
pjLimepjWhite
pjMaroon
pjColorAutomatic pjNavy
pjAqua pjOlive
pjBlack pjPurple
pjBlue pjRed
pjFuchsia pjSilver
pjGray pjTeal
pjGreen pjYellow
pjLime pjWhite
pjMaroon
CellColor Optional Variant
Pattern Optional Variant

Return Value
Boolean

Remarks

Using the TextStyles method without specifying any arguments displays the Text Styles dialog box.

See Also