ITextStory::GetText method

Gets the text in a story according to the specified conversion flags.

Syntax


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

Parameters

Flags [in]

Type: long

The conversion flags.

A Flags value of 0 retrieves text the same as ITextRange::GetText. Other values include the following.

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

Type: BSTR*

The text in the story.

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 is similar to using ITextRange2::GetText2 for a whole story, but it doesn’t require a range.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

IDL

Tom.idl

See also

ITextStory
ITextStory::SetText

 

 

Community Additions

ADD
Show:
© 2015 Microsoft