Skip to main content

TdxRichEditControlBase.LoadDocument(TStream,TdxRichEditDocumentFormat) Method

Loads a document from the specified stream.

Declaration

procedure LoadDocument(AStream: TStream; ADocumentFormat: TdxRichEditDocumentFormat); overload;

Parameters

Name Type Description
AStream TStream

Contains a source document.

ADocumentFormat TdxRichEditDocumentFormat

A document format.

Remarks

If the ADocumentFormat parameter accepts the TdxRichEditDocumentFormat.Undefined value, the LoadDocument procedure evaluates the stream’s content to detect the document format.

A successful LoadDocument method call updates the Options.DocumentSaveOptions.CurrentFileName and Options.DocumentSaveOptions.CurrentFormat properties and raises the OnDocumentLoaded event.

You can link the LoadDocument command to a UI element in your application to allow users to import documents.

Note

The Rich Edit control has built-in support only for the plain text and RTF document formats to avoid excessive dependencies. Refer to the following topic for information on how to enable the DOC, DOCX, and HTML formats: Rich Edit Control: Document Management.

A LoadDocument procedure call cannot export a document to the specified format if it is disabled.

See Also