Version

InsertTable Method

Inserts a new table at the specified document offset.
Syntax
'Declaration
 
Public Function InsertTable( _
   ByVal documentOffset As Integer, _
   ByVal columns As Integer, _
   ByVal rows As Integer, _
   ByRef error As String, _
   Optional ByVal extentBehavior As TableExtentBehavior, _
   Optional ByVal pageExtent As Nullable(Of Extent), _
   Optional ByVal fixedColumnWidth As Nullable(Of Extent), _
   Optional ByVal tableStyleId As String _
) As TableNode

Parameters

documentOffset
Document offset at which to insert new table.
columns
Number of columns in the table.
rows
Number of rows in the table.
error
If there's an error, this out parameter is set to the error information.
extentBehavior
Controls the initial widths of the table columns.
pageExtent
Extent of the page not including margins. This is used when extentBehavior is specified as FixedWidthColumns to calculate column widths in case fixedColumnWidth is not specified.
fixedColumnWidth
Used when extentBehavior is specified as FixedWidthColumns. If null or 0 is specified then column widths will be auto-calculated.
tableStyleId
Specifies the id of a table style in the DocumentRootNode.Styles collection or in the AvailableStyles collection that is to be used for the inserted table. If 'null' then the default 'TableGrid' style will be used.
Remarks
Returns the inserted TableNode or null if there's an error, such as an invalid 'tableStyleId' value.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also