Export (0) Print
Expand All
Expand Minimize

Range.ConvertToTable Method

Converts text within a range or selection to a table.

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

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
)

Parameters

Separator
Type: System.Object%
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
Type: System.Object%
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
Type: System.Object%
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
Type: System.Object%
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
Type: System.Object%
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
Type: System.Object%
Optional Object. True to apply the border properties of the specified format.
ApplyShading
Type: System.Object%
Optional Object. True to apply the shading properties of the specified format.
ApplyFont
Type: System.Object%
Optional Object. True to apply the font properties of the specified format.
ApplyColor
Type: System.Object%
Optional Object. True to apply the color properties of the specified format.
ApplyHeadingRows
Type: System.Object%
Optional Object. True to apply the heading-row properties of the specified format.
ApplyLastRow
Type: System.Object%
Optional Object. True to apply the last-row properties of the specified format.
ApplyFirstColumn
Type: System.Object%
Optional Object. True to apply the first-column properties of the specified format.
ApplyLastColumn
Type: System.Object%
Optional Object. True to apply the last-column properties of the specified format.
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.
AutoFitBehavior
Type: System.Object%
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
Type: System.Object%
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.

Community Additions

ADD
Show:
© 2014 Microsoft