ITextStory::SetFormattedText method (tom.h)

Replaces a story’s text with specified formatted text.

Syntax

HRESULT SetFormattedText(
  [in] IUnknown *pUnk
);

Parameters

[in] pUnk

Type: IUnknown*

The formatted text to replace the story’s text.

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_ACCESSDENIED
Write access is denied.
E_OUTOFMEMORY
Insufficient memory.

Remarks

This method calls IUnknown::QueryInterface for an ITextRange2 interface.

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

See also

ITextStory