Range.ConvertToTable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
abstract member ConvertToTable : obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj -> Microsoft.Office.Interop.Word.Table
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
- 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
- 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
- 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
- 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
- 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
- Object
Optional Object. True to apply the border properties of the specified format.
- ApplyShading
- Object
Optional Object. True to apply the shading properties of the specified format.
- ApplyFont
- Object
Optional Object. True to apply the font properties of the specified format.
- ApplyColor
- Object
Optional Object. True to apply the color properties of the specified format.
- ApplyHeadingRows
- Object
Optional Object. True to apply the heading-row properties of the specified format.
- ApplyLastRow
- Object
Optional Object. True to apply the last-row properties of the specified format.
- ApplyFirstColumn
- Object
Optional Object. True to apply the first-column properties of the specified format.
- ApplyLastColumn
- Object
Optional Object. True to apply the last-column properties of the specified format.
- AutoFit
- 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
- 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
- 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.