Propriedade DocumentBase.DefaultTableStyle

Obtém o estilo da tabela que é aplicado a todas as tabelas do documento.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (em Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Sintaxe

'Declaração
Public ReadOnly Property DefaultTableStyle As Object
public Object DefaultTableStyle { get; }

Valor de propriedade

Tipo: System.Object
O estilo da tabela que é aplicado a todas as tabelas do documento.

Exemplos

O exemplo de código a seguir usa a propriedade de DefaultTableStyle para testar se o estilo da tabela é definido como Tabela normal.Se o estilo da tabela é diferente, o código define o estilo padrão de tabela em estilo de Tabela normal .Para usar este exemplo, ele execução da classe de ThisDocument em um projeto de um documento nível.

Private Sub DocumentDefaultTableStyle()
    Dim tableStyle As Object = "Table Normal"
    If Me.DefaultTableStyle <> tableStyle Then
        Me.SetDefaultTableStyle(tableStyle, False)
    End If
End Sub 
private void DocumentDefaultTableStyle()
{
    object tableStyle = "Table Normal";
    if (this.DefaultTableStyle != tableStyle)
    {
        this.SetDefaultTableStyle(ref tableStyle, false);
    }
}

Segurança do .NET Framework

Consulte também

Referência

DocumentBase Classe

Namespace Microsoft.Office.Tools.Word