Range.ConvertToTable(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) Range.ConvertToTable(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) Method

Definition

Converts text within a range or selection to a table.

public Microsoft.Office.Interop.Word.Table ConvertToTable (ref object Separator, ref object NumRows, ref object NumColumns, ref object InitialColumnWidth, 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, ref object AutoFitBehavior, ref object DefaultTableBehavior);
Public Function ConvertToTable (Optional ByRef Separator As Object, Optional ByRef NumRows As Object, Optional ByRef NumColumns As Object, Optional ByRef InitialColumnWidth As Object, Optional ByRef Format As Object, Optional ByRef ApplyBorders As Object, Optional ByRef ApplyShading As Object, Optional ByRef ApplyFont As Object, Optional ByRef ApplyColor As Object, Optional ByRef ApplyHeadingRows As Object, Optional ByRef ApplyLastRow As Object, Optional ByRef ApplyFirstColumn As Object, Optional ByRef ApplyLastColumn As Object, Optional ByRef AutoFit As Object, Optional ByRef AutoFitBehavior As Object, Optional ByRef DefaultTableBehavior As Object) As Table

Parameters

Separator

Optional Object. Specifies the character used to separate text into cells. Can be a character or a WdTableFieldSeparator constant. If this argument is omitted, the value of the DefaultTableSeparator property is used.

NumRows

Optional Object. The number of rows in the table. If this argument is omitted, Word sets the number of rows, based on the contents of the range.

NumColumns

Optional Object. The number of columns in the table. If this argument is omitted, Word sets the number of columns, based on the contents of the range.

InitialColumnWidth

Optional Object. The initial width of each column, in points. If this argument is omitted, Word calculates and adjusts the column width so that the table stretches from margin to margin.

Format

Optional Object. Specifies one of the predefined formats listed in the Table AutoFormat dialog box (Table menu). Can be one of the WdTableFormat constants.

ApplyBorders

Optional Object. True to apply the border properties of the specified format.

ApplyShading

Optional Object. True to apply the shading properties of the specified format.

ApplyFont

Optional Object. True to apply the font properties of the specified format.

ApplyColor

Optional Object. True to apply the color properties of the specified format.

ApplyHeadingRows

Optional Object. True to apply the heading-row properties of the specified format.

ApplyLastRow

Optional Object. True to apply the last-row properties of the specified format.

ApplyFirstColumn

Optional Object. True to apply the first-column properties of the specified format.

ApplyLastColumn

Optional Object. True to apply the last-column properties of the specified format.

AutoFit

Optional Object. True to decrease the width of the table columns as much as possible without changing the way text wraps in the cells.

AutoFitBehavior

Optional Object. Sets the AutoFit rules for how Word sizes a table. Can be one of the WdAutoFitBehavior constants. If DefaultTableBehavior is wdWord8TableBehavior, this argument is ignored.

DefaultTableBehavior

Optional Object. Sets a value that specifies whether Microsoft Word automatically resizes cells in a table to fit the contents (AutoFit). Can be a WdDefaultTableBehavior constant.

Returns

Applies to