Back to Devexpress

RichEditDocumentServer.MailMerge(IRichEditDocumentServer) Method

officefileapi-devexpress-dot-xtrarichedit-dot-richeditdocumentserver-dot-mailmerge-x28-devexpress-dot-xtrarichedit-dot-iricheditdocumentserver-x29.md

latest4.5 KB
Original Source

RichEditDocumentServer.MailMerge(IRichEditDocumentServer) Method

OBSOLETE

This method has become obsolete. Use another MailMerge method overload with appropriate parameters instead.

Merges the current document and sends the result to the specified RichEditDocumentServer instance.

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
[Browsable(false)]
[Obsolete("This method has become obsolete. Use another MailMerge method overload with appropriate parameters instead.")]
public void MailMerge(
    IRichEditDocumentServer documentServer
)
vb
<Browsable(False)>
<Obsolete("This method has become obsolete. Use another MailMerge method overload with appropriate parameters instead.")>
Public Sub MailMerge(
    documentServer As IRichEditDocumentServer
)

Parameters

NameTypeDescription
documentServerIRichEditDocumentServer

An object implementing the IRichEditDocumentServer interface, such as the RichEditDocumentServer or the RichEditControl instance.

|

Remarks

Use this method to process the resulting document in the RichEditDocumentServer. For example, if merge fields are nested within DOCVARIABLE fields, you can call the FieldCollection.Update method to calculate filed content by handling the RichEditDocumentServer.CalculateDocumentVariable event.

Note that the CalculateDocumentVariable event is also raised for the object with the IRichEditDocumentServer interface, passed as an argument to the MailMerge method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MailMerge(IRichEditDocumentServer) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

word-document-api-create-master-detail-report/CS/MergeProcessor.cs#L77

csharp
// The CalculateDocumentVariable event for the richServerMaster fires.
suppllierRichEdit.MailMerge(richServerMaster);
richServerMaster.CalculateDocumentVariable -= richServerMaster_CalculateDocumentVariable;

word-document-api-create-master-detail-report/VB/MergeProcessor.vb#L72

vb
' The CalculateDocumentVariable event for the richServerMaster fires.
suppllierRichEdit.MailMerge(richServerMaster)
RemoveHandler richServerMaster.CalculateDocumentVariable, AddressOf richServerMaster_CalculateDocumentVariable

Implements

MailMerge(IRichEditDocumentServer)

See Also

RichEditDocumentServer Class

RichEditDocumentServer Members

DevExpress.XtraRichEdit Namespace