Export (0) Print
Expand All

Tables.Add method

Returns a Table object that represents a new, blank table added to a document.

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

Table Add(
	Range Range,
	int NumRows,
	int NumColumns,
	ref Object DefaultTableBehavior,
	ref Object AutoFitBehavior
)

Parameters

Range
Type: Microsoft.Office.Interop.Word.Range

Required Range object. The range where you want the table to appear. The table replaces the range, if the range isn't collapsed.

NumRows
Type: System.Int32

Required Integer. The number of rows you want to include in the table.

NumColumns
Type: System.Int32

Required Integer. The number of columns you want to include in the table.

DefaultTableBehavior
Type: System.Object

Optional Object. Sets a value that specifies whether Word automatically resizes cells in tables to fit the cells’ contents (AutoFit). Can be either of the following constants: wdWord8TableBehavior (AutoFit disabled) or wdWord9TableBehavior (AutoFit enabled). The default constant is wdWord8TableBehavior.

AutoFitBehavior
Type: System.Object

Optional Object. Sets the AutoFit rules for how Microsoft Word sizes tables. Can be one of the following WdAutoFitBehavior constants: wdAutoFitContent, wdAutoFitFixed, or wdAutoFitWindow. If DefaultTableBehavior is set to wdWord8TableBehavior, this argument is ignored.

Show:
© 2014 Microsoft