Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxRichEditControlBase.LoadDocumentTemplate(TStream,TdxRichEditDocumentFormat) Method

Loads a document template from a specified stream.

#Declaration

Delphi
procedure LoadDocumentTemplate(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 LoadDocumentTemplate procedure evaluates the stream’s content to detect the document format.

A successful LoadDocumentTemplate procedure call raises the OnDocumentLoaded event. The Rich Edit control treats the loaded document as a new one (that is, resets the Options.DocumentSaveOptions.CurrentFileName and Options.DocumentSaveOptions.CurrentFormat properties).

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 LoadDocumentTemplate procedure call cannot import a document if its format is disabled.

See Also