Class DataTable (Word VBA)

The class DataTable represents a chart data table. To use a DataTable class variable it first needs to be instantiated, for example


Dim dte as DataTable
Set dte = ActiveDocument.Background.Chart.DataTable

Border

Returns the border of the object.


Dim cbrBorder As ChartBorder
Set cbrBorder = ActiveDocument.Background.Chart.DataTable.Border

Delete

Deletes the object.


ActiveDocument.Background.Chart.DataTable.Delete

Font

Returns the font of the specified object.


Dim cftFont As ChartFont
Set cftFont = ActiveDocument.Background.Chart.DataTable.Font

Format

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


Dim cftFormatted As ChartFormat
Set cftFormatted = ActiveDocument.Background.Chart.DataTable.Format

HasBorderHorizontal

True if the chart data table has horizontal cell borders.


With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart 
 .HasDataTable = True 
 With .DataTable 
 .HasBorderHorizontal = False 
 .HasBorderVertical = False 
 .HasBorderOutline = True 
 End With 
 End With 
 End If 
End With

HasBorderOutline

True if the chart data table has outline borders.


With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart 
 .HasDataTable = True 
 With .DataTable 
 .HasBorderHorizontal = False 
 .HasBorderVertical = False 
 .HasBorderOutline = True 
 End With 
 End With 
 End If 
End With

HasBorderVertical

True if the chart data table has vertical cell borders.


With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart 
 .HasDataTable = True 
 With .DataTable 
 .HasBorderHorizontal = False 
 .HasBorderVertical = False 
 .HasBorderOutline = True 
 End With 
 End With 
 End If 
End With

Select

Selects the object.


ActiveDocument.Background.Chart.DataTable.Select

ShowLegendKey

True if the data label legend key is visible.


ActiveDocument.Background.Chart.DataTable.ShowLegendKey = True