Export (0) Print
Expand All
Expand Minimize

Document.DefaultTableStyle Property

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

Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in microsoft.office.tools.word.dll)

public virtual Object DefaultTableStyle { get; }

Property Value

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

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.

private void DocumentDefaultTableStyle()
{
    object tableStyle = "Table Normal";
    if (this.DefaultTableStyle != tableStyle)
    {
        this.SetDefaultTableStyle(ref tableStyle, false);
    }
}

Show:
© 2015 Microsoft