InsertText method

Inserts text at the position of the insertion point.

Syntax

HRESULT retVal = object.InsertText(pText, lLen);

Parameters

  • pText [in]
    Type: OLECHAR

    A pointer to a variable of type OLECHAR that specifies the string containing the text to insert.

  • lLen [in]
    Type: LONG

    A LONG that specifies the number of characters to insert from pText. Setting this parameter to -1 inserts the whole string.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.