Document.DefaultTableStyle Property (2007 System)
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.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property DefaultTableStyle As Object
'Usage
Dim instance As Document
Dim value As Object
value = instance.DefaultTableStyle
[BrowsableAttribute(false)]
public Object DefaultTableStyle { get; }
[BrowsableAttribute(false)]
public:
property Object^ DefaultTableStyle {
Object^ get ();
}
public function get DefaultTableStyle () : Object
Property Value
Type: System.Object
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.
This example is for a document-level customization.
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);
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.