.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

SubDocument.AppendDocumentContent(String, DocumentFormat) Method

Appends content from the stream.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v20.1.Core.dll

Declaration

DocumentRange AppendDocumentContent(
    string fileName,
    DocumentFormat format
)
Function AppendDocumentContent(
    fileName As String,
    format As DocumentFormat
) As DocumentRange

Parameters

Name Type Description
fileName String

A string representing a filename of the document whose content is being appended.

format DocumentFormat

A DocumentFormat enumeration specifying the format of the data contained in the file.

Returns

Type Description
DocumentRange

A DocumentRange representing a range with the appended content.

Remarks

The AppendDocumentContent method imports the specified file into the internal document model. If the format parameter is set to DocumentFormat.Undefined, the importer attempts to auto detect the format of the specified file.

If the format auto detect fails, a fallback format is used. Currently the fallback format is plain text.

After the file is successfully imported, the new document model is inserted at the end of the main document.

The appended text starts with a new paragraph and preserves formatting. It is appended to an existing section and gets all section details (header, footer, page and print layout).

If the text being inserted contains document styles which are not present in the current document, the styles are copied to the resulting document.

If the document whose content is being inserted contains floating objects, such as pictures or text boxes, they are inserted into the corresponding positions in a newly created range.

See Also