Classe DataTable - tabela de dados (Word VBA)

A classe DataTable representa uma tabela de dados de gráfico. Para usar uma variável de classe DataTable, ela primeiro precisa ser instanciada por exemplo


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

Border

Retorna a borda do objeto. Somente leitura ChartBorder.


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

Delete

Exclui o objeto.


ActiveDocument.Background.Chart.DataTable.Delete

Font

Retorna a fonte do objeto especificado. Somente leitura ChartFont.


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

Format

Retorna a linha, preenchimento e efeito da formatação do objeto. Somente leitura ChartFormat.


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

HasBorderHorizontal

True se a tabela de dados do gráfico tiver bordas de célula horizontais. Boolean de leitura/gravação.


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 se a tabela de dados do gráfico tiver contornos. Boolean de leitura/gravação.


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 se a tabela de dados do gráfico tem bordas de células verticais. Boolean de leitura/gravação.


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

Seleciona o objeto.


ActiveDocument.Background.Chart.DataTable.Select

ShowLegendKey

True se a tecla de legenda do rótulo de dados estiver visível. Boolean de leitura/gravação.


ActiveDocument.Background.Chart.DataTable.ShowLegendKey = True