Class ChartCharacters (PowerPoint VBA)

The class ChartCharacters represents characters in an object that contains text.

Set

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

Dim ccs as ChartCharacters
Set ccs = ActiveWindow.RangeFromPoint.Chart.ChartTitle.Characters

The following procedures can be used to set variables of type ChartCharacters: AxisTitle.Characters, ChartTitle.Characters, DataLabel.Characters and DisplayUnitLabel.Characters

Caption

Returns the text of this range of characters.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Characters.Caption =

Count

Returns the number of objects in the collection.

Dim lngCount As Long
lngCount = ActivePresentation.Slides(1).Shapes(1).Chart.ChartTitle.Characters.Count

Delete

Deletes the object.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Characters.Delete

Font

Returns the font of the specified object.

Dim cftFont As ChartFont
Set cftFont = ActiveWindow.RangeFromPoint.Chart.ChartTitle.Characters.Font

Insert

Inserts a string preceding the selected characters.

Syntax : expression.Insert (String)

String: The string to insert.

Dim strString As String: strString = 
ActiveWindow.RangeFromPoint.Chart.ChartTitle.Characters.Insert String:=strString

Parent

Returns the parent for the specified object. Read-only object.

PhoneticCharacters

Returns or sets the phonetic text for the object.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartTitle.Characters.PhoneticCharacters =

Text

Returns or sets the text for the specified object.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Characters.Text =