Format related procedures in class Axis (Word VBA)

This page presents procedures from class Axis related to the theme Format: Border, Format, TickLabelSpacing, TickLabelSpacingIsAuto and TickMarkSpacing

Border

Returns the border of the object.

Dim cbrBorder As ChartBorder
Set cbrBorder = ActiveDocument.Background.Chart.Axes(1).Border

Format

Returns the line, fill, and effect formatting for the object.

Dim cftFormatted As ChartFormat
Set cftFormatted = ActiveDocument.Background.Chart.Axes(1).Format

TickLabelSpacing

Returns or sets the number of categories or series between tick-mark labels.

This property applies only to category and series axes. It can be a value from 1 through 31999. Tick-mark label spacing on the value axis is always calculated by Microsoft Word.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 .Chart.Axes(xlCategory).TickLabelSpacing = 10 
 End If 
End With

TickLabelSpacingIsAuto

Returns or sets a value that indicates whether the tick label spacing is automatic.

The TickLabelSpacing property returns the current tick label spacing, whether or not the setting is automatic.

ActiveDocument.Background.Chart.Axes(1).TickLabelSpacingIsAuto = True

TickMarkSpacing

Returns or sets the number of categories or series between tick marks.

This property applies only to category and series axes. It can be a value from 1 through 31999. Use the MajorUnit and MinorUnit properties to set tick-mark spacing on the value axis.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 .Chart.Axes(xlCategory).TickMarkSpacing = 10 
 End If 
End With