Compartir a través de


DocumentBase.DefaultTableStyle Property

Definition

Gets the table style that is applied to all newly created tables in the document.

public:
 property System::Object ^ DefaultTableStyle { System::Object ^ get(); };
public object DefaultTableStyle { get; }
member this.DefaultTableStyle : obj
Public ReadOnly Property DefaultTableStyle As Object

Property Value

The table style that is applied to all newly created tables in the document.

Examples

The following code example uses the DefaultTableStyle property to test whether the table style is set to Table Normal. If the table style is different, the code sets the default table style to the Table Normal style. To use this example, run it from the ThisDocument class in a document-level project.

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

Applies to