ITextStrings::Append method (tom.h)

Appends a string to the string at the specified index in the collection.

Syntax

HRESULT Append(
  [in] ITextRange2 *pRange,
  [in] long        iString
);

Parameters

[in] pRange

Type: ITextRange2*

The string to append.

[in] iString

Type: long

The string index.

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 code Description
E_INVALIDARG
Invalid argument.
E_OUTOFMEMORY
Insufficient memory.

Remarks

The index is relative to the top of the collection, so if iString is equal to 0 the string is inserted at the top. If iString is equal to –1, it is inserted below the top string, and so on.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See also

ITextStrings