Table.AutoFormat Method

Applies a predefined look to a table.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Sub AutoFormat ( _
    ByRef Format As Object, _
    ByRef ApplyBorders As Object, _
    ByRef ApplyShading As Object, _
    ByRef ApplyFont As Object, _
    ByRef ApplyColor As Object, _
    ByRef ApplyHeadingRows As Object, _
    ByRef ApplyLastRow As Object, _
    ByRef ApplyFirstColumn As Object, _
    ByRef ApplyLastColumn As Object, _
    ByRef AutoFit As Object _
)
'Usage
Dim instance As Table
Dim Format As Object
Dim ApplyBorders As Object
Dim ApplyShading As Object
Dim ApplyFont As Object
Dim ApplyColor As Object
Dim ApplyHeadingRows As Object
Dim ApplyLastRow As Object
Dim ApplyFirstColumn As Object
Dim ApplyLastColumn As Object
Dim AutoFit As Object

instance.AutoFormat(Format, ApplyBorders, _
    ApplyShading, ApplyFont, ApplyColor, _
    ApplyHeadingRows, ApplyLastRow, _
    ApplyFirstColumn, ApplyLastColumn, _
    AutoFit)
void AutoFormat(
    ref Object Format,
    ref Object ApplyBorders,
    ref Object ApplyShading,
    ref Object ApplyFont,
    ref Object ApplyColor,
    ref Object ApplyHeadingRows,
    ref Object ApplyLastRow,
    ref Object ApplyFirstColumn,
    ref Object ApplyLastColumn,
    ref Object AutoFit
)

Parameters

  • ApplyBorders
    Type: System.Object%
    Optional Object. True to apply the border properties of the specified format. The default value is True.
  • ApplyShading
    Type: System.Object%
    Optional Object. True to apply the shading properties of the specified format. The default value is True.
  • ApplyFont
    Type: System.Object%
    Optional Object. True to apply the font properties of the specified format. The default value is True.
  • ApplyColor
    Type: System.Object%
    Optional Object. True to apply the color properties of the specified format. The default value is True.
  • ApplyHeadingRows
    Type: System.Object%
    Optional Object. True to apply the heading-row properties of the specified format. The default value is True.
  • ApplyLastRow
    Type: System.Object%
    Optional Object. True to apply the last-row properties of the specified format. The default value is False.
  • ApplyFirstColumn
    Type: System.Object%
    Optional Object. True to apply the first-column properties of the specified format. The default value is True.
  • ApplyLastColumn
    Type: System.Object%
    Optional Object. True to apply the last-column properties of the specified format. The default value is False.
  • AutoFit
    Type: System.Object%
    Optional Object. True to decrease the width of the table columns as much as possible without changing the way text wraps in the cells. The default value is True.

Remarks

The arguments for this method correspond to the options in the Table AutoFormat dialog box (Table menu).

See Also

Reference

Table Interface

Table Members

Microsoft.Office.Interop.Word Namespace