Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.TextStylesEx Method (Project)

office 365 dev account|Last Updated: 10/19/2017
|
2 Contributors

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

Syntax

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

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
ItemOptionalIntegerThe type of text to change. Can be one of the following PjTextItem constants. See If the Gantt Chart is active.
FontOptionalStringThe name of the font. The Font argument is ignored if the active view is the Network Diagram and Item is not pjAll.
SizeOptionalIntegerThe size of the font in points. The Size argument is ignored if the active view is the Network Diagram and Item is not pjAll.
BoldOptionalBooleanTrue if the font is bold; otherwise, False.
ItalicOptionalBooleanTrue if the font is italic; otherwise, False.
UnderlineOptionalBooleanTrue if the font is underlined; otherwise, False.
ColorOptionalLongThe color of the font. Can be one of the PjColor constants (see the PjColor constants table).
CellColorOptionalLongThe background color of the cell. Can be one of the PjColor constants.
PatternOptionalIntegerThe background pattern of the cell. Can be one of the PjBackgroundPattern 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

pjAllpjGanttMajorTimescale
pjNoncriticalpjGanttMinorTimescale
pjCriticalpjBarTextLeft
pjMilestonepjBarTextRight
pjSummarypjBarTextTop
pjProjectSummarypjBarTextBottom
pjMarkedpjBarTextInside
pjTaskFilterHighlightpjGanttExternalTask
pjTaskRowColumnTitles
pjAllpjTaskFilterHighlight
pjCriticalpjTaskMajorTimescale
pjMarkedpjTaskMinorTimescale
pjMilestonepjTaskRowColumnTitles
pjNoncriticalpjTaskUsageAssignmentRow
pjProjectSummarypjTaskUsageExternalTask
pjSummary
pjAllpjProjectSummary
pjCriticalpjSummary
pjMarkedpjTaskSheetExternalTask
pjMilestonepjTaskFilterHighlight
pjNoncriticalpjTaskRowColumnTitles


PjColor constants

pjColorAutomaticpjNavy
pjAquapjOlive
pjBlackpjPurple
pjBluepjRed
pjFuchsiapjSilver
pjGraypjTeal
pjGreenpjYellow
pjLimepjWhite
pjMaroon


Return value

Boolean

Remarks

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

To set the text style by using hexadicimal RGB values, see the TextStyles32Ex method.

© 2018 Microsoft