Class AxisTitle (Word VBA)

The class AxisTitle represents a chart axis title.

The main procedures of class AxisTitle are Delete and Select


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

Dim ate as AxisTitle
Set ate = ActiveDocument.Background.Chart.Axes(1).AxisTitle

AxisTitle class variables can be set using the Axis.AxisTitle procedure.


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


These are the main methods of the AxisTitle class

Delete - Deletes the object.


Select - Selects the object.



Caption returns or sets a String value that represents the axis title text.

ActiveDocument.Background.Chart.Axes(1).AxisTitle.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.Axes(1).AxisTitle.Characters

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

Dim dblHeight As Double
dblHeight = ActiveDocument.Background.Chart.Axes(1).AxisTitle.Height

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

ActiveDocument.Background.Chart.Axes(1).AxisTitle.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.Axes(1).AxisTitle.Left =

Name returns a String value that represents the name of the object.

Dim strName As String
strName = ActiveDocument.Background.Chart.Axes(1).AxisTitle.Name

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

ActiveDocument.Background.Chart.Axes(1).AxisTitle.Orientation =

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

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.Axes(1).AxisTitle.Parent

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

ActiveDocument.Background.Chart.Axes(1).AxisTitle.Position = xlChartElementPositionAutomatic

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

ActiveDocument.Background.Chart.Axes(1).AxisTitle.ReadingOrder =

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

ActiveDocument.Background.Chart.Axes(1).AxisTitle.Shadow = True

Text returns or sets the text for the specified object.

ActiveDocument.Background.Chart.Axes(1).AxisTitle.Text =

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

ActiveDocument.Background.Chart.Axes(1).AxisTitle.Top =

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

ActiveDocument.Background.Chart.Axes(1).AxisTitle.VerticalAlignment = xl3DBar

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

Dim dblWidth As Double
dblWidth = ActiveDocument.Background.Chart.Axes(1).AxisTitle.Width