TextStyles Method

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

Syntax

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

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

PjTextItem

If the Gantt Chart is active:

pjAll pjGanttMajorTimescale
pjNoncritical pjGanttMinorTimescale
pjCritical pjBarTextLeft
pjMilestone pjBarTextRight
pjSummary pjBarTextTop
pjProjectSummary pjBarTextBottom
pjMarked pjBarTextInside
pjTaskFilterHighlight pjGanttExternalTask
pjTaskRowColumnTitles  

If the Calendar view is active:

pjAll pjMarked
pjCalendarExternalTask pjMilestone
pjCalendarMonthlyTitles pjMonthPreviews
pjCritical pjNoncritical
pjDailyTitles pjProjectSummary
pjDateBoxBottomLeft pjSummary
pjDateBoxBottomRight pjTaskFilterHighlight
pjDateBoxTopLeft pjWeeklyTitles
pjDateBoxTopRight  

If the Task Usage view is active:

pjAll pjTaskFilterHighlight
pjCritical pjTaskMajorTimescale
pjMarked pjTaskMinorTimescale
pjMilestone pjTaskRowColumnTitles
pjNoncritical pjTaskUsageAssignmentRow
pjProjectSummary pjTaskUsageExternalTask
pjSummary  

If the Task Sheet is active:

pjAll pjProjectSummary
pjCritical pjSummary
pjMarked pjTaskSheetExternalTask
pjMilestone pjTaskFilterHighlight
pjNoncritical pjTaskRowColumnTitles

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.

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.

PjColor

pjColorAutomatic pjNavy
pjAqua pjOlive
pjBlack pjPurple
pjBlue pjRed
pjFuchsia pjSilver
pjGray pjTeal
pjGreen pjYellow
pjLime pjWhite
pjMaroon  

Remarks

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

Applies to | Application Object

See Also | Font Method | FormatCopy Method | FormatPaste Method