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

TdxRichEditCustomDocumentServer.LoadDocument(string,TdxRichEditDocumentFormat) Method

Loads a document from the specified file.

#Declaration

Delphi
procedure LoadDocument(const AFileName: string; ADocumentFormat: TdxRichEditDocumentFormat); overload;

#Parameters

Name Type Description
AFileName string

An absolute or relative path to a source document file.

ADocumentFormat TdxRichEditDocumentFormat

A document format.

#Remarks

If the ADocumentFormat parameter accepts the TdxRichEditDocumentFormat.Undefined value, the LoadDocument procedure detects the target format by the file name extension. If the file name has no extension, the LoadDocument procedure iterates through all supported document formats to find the best possible match in the target file’s content.

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

Note

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

A LoadDocument procedure call cannot import a document if its format is disabled.

See Also