Compartir a través de


DocumentBase.DefaultTableStyle (Propiedad)

Obtiene el estilo de tabla aplicado a todas las tablas creadas recientemente en el documento.

Espacio de nombres:  Microsoft.Office.Tools.Word
Ensamblado:  Microsoft.Office.Tools.Word.v4.0.Utilities (en Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Sintaxis

'Declaración
Public ReadOnly Property DefaultTableStyle As Object
public Object DefaultTableStyle { get; }

Valor de propiedad

Tipo: System.Object
El estilo de tabla aplicado a todas las tablas creadas recientemente en el documento.

Ejemplos

En el ejemplo de código siguiente se utiliza la propiedad DefaultTableStyle para probar si el estilo de tabla está establecido en Table Normal.Si el estilo de tabla es diferente, el código establece el estilo de tabla predeterminado en el estilo Table Normal.Para usar este ejemplo, ejecútelo desde la clase ThisDocument en un proyecto de nivel de documento.

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);
    }
}

Seguridad de .NET Framework

Vea también

Referencia

DocumentBase Clase

Microsoft.Office.Tools.Word (Espacio de nombres)