Class ChartFont (Word VBA)

Contains the font attributes (font name, font size, color, and so on) for an object chart.

The classes ChartCharacters, DataTable, LegendEntry and TickLabels. give access to class ChartFont

To use a ChartFont class variable it first needs to be instantiated, for example

Dim cft as ChartFont
Set cft = ActiveDocument.Background.Chart.DataTable.Font

The following procedures can be used to set variables of type ChartFont: ChartCharacters.Font, DataTable.Font, LegendEntry.Font and TickLabels.Font.

Properties

Background returns or sets the type of background for text used in charts. Read/write Variant that is set to one of the constants of XlBackground.

Bold true if the font is bold.

Color returns or sets the primary color of the object.

ColorIndex returns or sets the color of the font.

FontStyle returns or sets the font style. Read/write String.

Italic true if the font style is italic. Read/write Boolean.

Name returns or sets the name of the string. Read/write String.

Size returns or sets the size of the font.

StrikeThrough true if the font is struck through with a horizontal line. Read/write Boolean.

Subscript true if the font is formatted as subscript. The default is False.

Superscript true if the font is formatted as superscript. The default is False.

Underline returns or sets the type of underline applied to the font. Can be one of the XlUnderlineStyle constants. Read/write Variant.