ITextRange2::GetText2 method (tom.h)
Gets the text in this range according to the specified conversion flags.
Syntax
HRESULT GetText2(
[in] long Flags,
[out] BSTR *pbstr
);
Parameters
[in] Flags
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
[out] pbstr
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 code | Description |
---|---|
|
Invalid argument. |
|
Write access is denied. |
|
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
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 |