All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

RichEditControl.LoadDocumentTemplate(Byte[]) Method

Loads a document template from a byte array.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v20.2.dll

Declaration

public bool LoadDocumentTemplate(
    byte[] buffer
)
Public Function LoadDocumentTemplate(
    buffer As Byte()
) As Boolean

Parameters

Name Type Description
buffer Byte[]

A byte array that contains document data.

Returns

Type Description
Boolean

true if the document was successfully loaded; otherwise, false.

Remarks

A document template cannot be overwritten either in code or in the UI. The information about the original file location and its format is dropped. An attempt to save (i.e., overwrite) the original document invokes the Save As dialog.

The RichEditControl uses the built-in IFormatDetectorService service implementation to detect the loaded document's format. If format detection fails, the RichEditControl.InvalidFormatException event fires.

TIP

Use the LoadDocument method overloads with explicit format definition to improve performance.

See Also