ITextRange2::InsertTable method

Inserts a table in a range.

Syntax


HRESULT InsertTable(
  [in]  long cCol,
  [in]  long cRow,
  [in]  long AutoFit
);

Parameters

cCol [in]

Type: long

The number of columns in the table.

cRow [in]

Type: long

The number of rows in the table.

AutoFit [in]

Type: long

Specifies how the cells fit the target space.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information about COM error codes, see Error Handling in COM.

Return codeDescription
E_INVALIDARG

Invalid argument.

E_OUTOFMEMORY

Insufficient memory.

 

Remarks

If the range is nondegenerate, the table replaces the text in the range. The column widths are calculated according to the AutoFit parameter, and the borders are solid black with 0.5 point widths. To change these defaults, use the ITextRange2::GetRow method to obtain an ITextRow interface.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

ITextRange2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft