Back to Devexpress

RichEditMailMergeOptions.ViewMergedData Property

officefileapi-devexpress-dot-xtrarichedit-dot-richeditmailmergeoptions-adb35ff9.md

latest6.5 KB
Original Source

RichEditMailMergeOptions.ViewMergedData Property

Specifies whether to display field results or field codes in a mail merge document.

Namespace : DevExpress.XtraRichEdit

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
[DefaultValue(false)]
public bool ViewMergedData { get; set; }
vb
<DefaultValue(False)>
Public Property ViewMergedData As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to display actual data; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ViewMergedData
RichEditControlOptionsBase

.MailMerge .ViewMergedData

|

Remarks

Use this property to select whether the document fields should display their associated data source records or their field codes.

When the ViewMergedData is enabled, a field displays the data record with the index specified by the RichEditMailMergeOptions.ActiveRecord property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ViewMergedData property.

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.

winforms-richedit-control-mail-merge/CS/MailMerge/Form1.cs#L21

csharp
richEditControl1.Options.MailMerge.DataSource = new SampleData();
    richEditControl1.Options.MailMerge.ViewMergedData = true;
}

winforms-richedit-use-images-in-mail-merge/CS/Form1.cs#L23

csharp
richEditControl1.Options.MailMerge.DataSource = NorthwindDataProvider.Categories;
richEditControl1.Options.MailMerge.ViewMergedData = true;

word-document-api-use-printablecomponentlink-to-print-document/CS/PrintingSystem/Form1.cs#L32

csharp
// Display field values instead of code.
srv.Options.MailMerge.ViewMergedData = true;
// Create a printable link to print a document.

how-to-replace-document-fields-with-their-values/CS/Form1.cs#L24

csharp
richEditControl1.Options.MailMerge.DataSource = list;
    richEditControl1.Options.MailMerge.ViewMergedData = true;
}

word-processing-use-images-in-richedit-mail-merge/CS/Program.cs#L21

csharp
wordProcessor.Options.MailMerge.DataSource = NorthwindDataProvider.Categories;
wordProcessor.Options.MailMerge.ViewMergedData = true;
MergeToNewDocument(wordProcessor);

winforms-richedit-control-mail-merge/VB/MailMerge/Form1.vb#L19

vb
richEditControl1.Options.MailMerge.DataSource = New SampleData()
    richEditControl1.Options.MailMerge.ViewMergedData = True
End Sub

winforms-richedit-use-images-in-mail-merge/VB/Form1.vb#L21

vb
richEditControl1.Options.MailMerge.DataSource = NorthwindDataProvider.Categories
richEditControl1.Options.MailMerge.ViewMergedData = True
dataNavigator1.DataSource = NorthwindDataProvider.Categories

word-document-api-use-printablecomponentlink-to-print-document/VB/PrintingSystem/Form1.vb#L32

vb
' Display field values instead of code.
srv.Options.MailMerge.ViewMergedData = True
' Create a printable link to print a document.

how-to-replace-document-fields-with-their-values/VB/Form1.vb#L21

vb
richEditControl1.Options.MailMerge.DataSource = list
    richEditControl1.Options.MailMerge.ViewMergedData = True
End Sub

word-processing-use-images-in-richedit-mail-merge/VB/Program.vb#L17

vb
wordProcessor.Options.MailMerge.DataSource = NorthwindDataProvider.Categories
wordProcessor.Options.MailMerge.ViewMergedData = True
MergeToNewDocument(wordProcessor)

See Also

Mail Merge in Rich Text Documents

RichEditMailMergeOptions Class

RichEditMailMergeOptions Members

DevExpress.XtraRichEdit Namespace