ITextRange2::GetText2 method

Gets the text in this range according to the specified conversion flags.

Syntax


HRESULT GetText2(
  [in]   long Flags,
  [out]  BSTR *pbstr
);

Parameters

Flags [in]

Type: long

The flags controlling how the text is retrieved. The flags can include a combination of the following values. Specifying a Flags value of 0 is the same as calling the ITextRange::GetText method.

tomAdjustCRLF
tomUseCRLF
tomIncludeNumbering
tomNoHidden
tomNoMathZoneBrackets
tomTextize
tomAllowFinalEOP
tomTranslateTableCell
tomFoldMathAlpha
tomLanguageTag
pbstr [out]

Type: BSTR*

The text in the range.

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_ACCESSDENIED

Write access is denied.

E_OUTOFMEMORY

Insufficient memory.

 

Remarks

This method includes the special flag tomLanguageTag to get the BCP-47 language tag for the range. This is an industry standard language tag which may be preferable to the language code identifier (LCID) obtained by calling ITextFont::GetLanguageID.

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
ITextRange2::SetText2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft