MergePastedLists

ImportFormatOptions.MergePastedLists property

Gets or sets a boolean value that specifies whether pasted lists will be merged with surrounding lists. The default value is false.

public bool MergePastedLists { get; set; }

Examples

Shows how to merge lists from a documents.

Document srcDoc = new Document(MyDir + "List item.docx");
Document dstDoc = new Document(MyDir + "List destination.docx");

ImportFormatOptions options = new ImportFormatOptions { MergePastedLists = true };

// Set the "MergePastedLists" property to "true" pasted lists will be merged with surrounding lists.
dstDoc.AppendDocument(srcDoc, ImportFormatMode.UseDestinationStyles, options);

dstDoc.Save(ArtifactsDir + "Document.MergePastedLists.docx");

See Also