MailMergeOptions.RetainFirstSectionStart
MailMergeOptions RetainFirstSectionStart property. Gets or sets a value indicating whether the section start of the first document section and its copies for subsequent data source rows are retained during mail merge or updated according to MS Word behaviour.
MailMergeOptions.RetainFirstSectionStart property
Gets or sets a value indicating whether the section start of the first document section and its copies for subsequent data source rows are retained during mail merge or updated according to MS Word behaviour.
public bool RetainFirstSectionStart { get; set; }
Remarks
The default value is true
.
Examples
Shows how to fill template with data by executing simple mail merge with DataTable data source with mail merge options.
DataTable dt = new DataTable();
dt.Columns.Add("FirstName");
dt.Columns.Add("SecondName");
dt.Columns.Add("Position");
dt.Rows.Add("James", "Bond", "Spy");
dt.Rows.Add("John", "Doe", "Unknown");
MailMergeOptions mailMergeOptions = new MailMergeOptions();
mailMergeOptions.RetainFirstSectionStart = false;
MailMerger.Execute(MyDir + "MailMergeTemplate.docx", ArtifactsDir + "MailMerger.Execute.DataTable.pdf", SaveFormat.Pdf, dt, mailMergeOptions);
See Also
- class MailMergeOptions
- namespace Wordize.MailMerging
- assembly Wordize