Class ChartTitle (Word VBA)

The class ChartTitle represents the chart title.

The main procedures of class ChartTitle are Delete and Select

Set

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

Dim cte as ChartTitle
Set cte = ActiveDocument.Background.Chart.ChartTitle

ChartTitle class variables can be set using the Chart.ChartTitle procedure.

Themes

Some procedures in this class have been grouped together in themes and are described on separate theme pages

Format with its procedures Format and IncludeInLayout
Formula with its procedures Formula, FormulaLocal, FormulaR1C1 and FormulaR1C1Local

Methods

These are the main methods of the ChartTitle class

Delete - Deletes the object.

ActiveDocument.Background.Chart.ChartTitle.Delete

Select - Selects the object.

ActiveDocument.Background.Chart.ChartTitle.Select

Properties

Caption returns or sets the chart title text.

ActiveDocument.Background.Chart.ChartTitle.Caption =

Characters returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.

Dim ccsCharacters As ChartCharacters
Set ccsCharacters = ActiveDocument.Background.Chart.ChartTitle.Characters

Height returns the height, in points, of the object.

Dim dblHeight As Double
dblHeight = ActiveDocument.Background.Chart.ChartTitle.Height

HorizontalAlignment returns or sets the horizontal alignment for the specified object.

ActiveDocument.Background.Chart.ChartTitle.HorizontalAlignment = xl3DBar

Left returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area.

ActiveDocument.Background.Chart.ChartTitle.Left =

Name returns the name of the object.

Dim strName As String
strName = ActiveDocument.Background.Chart.ChartTitle.Name

Orientation returns or sets the text orientation. Read/write Long.

ActiveDocument.Background.Chart.ChartTitle.Orientation =

Parent returns the parent for the specified object. Read-only object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.ChartTitle.Parent

Position returns or sets the position of the chart title on the chart.

ActiveDocument.Background.Chart.ChartTitle.Position = xlChartElementPositionAutomatic

ReadingOrder returns or sets an XlReadingOrder constant that represents the reading order for the specified object.

ActiveDocument.Background.Chart.ChartTitle.ReadingOrder =

Shadow returns or sets a value that indicates whether the object has a shadow.

ActiveDocument.Background.Chart.ChartTitle.Shadow = True

Text returns or sets the text for the specified object.

ActiveDocument.Background.Chart.ChartTitle.Text =

Top returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart).

ActiveDocument.Background.Chart.ChartTitle.Top =

VerticalAlignment returns or sets the vertical alignment of the specified object.

ActiveDocument.Background.Chart.ChartTitle.VerticalAlignment = xl3DBar

Width returns the width, in points, of the object.

Dim dblWidth As Double
dblWidth = ActiveDocument.Background.Chart.ChartTitle.Width