Aspose::Words::ImportFormatOptions::get_MergePastedLists method

ImportFormatOptions::get_MergePastedLists method

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

bool Aspose::Words::ImportFormatOptions::get_MergePastedLists() const

Examples

Shows how to merge lists from a documents.

auto srcDoc = MakeObject<Document>(MyDir + u"List item.docx");
auto dstDoc = MakeObject<Document>(MyDir + u"List destination.docx");

auto options = MakeObject<ImportFormatOptions>();
options->set_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 + u"Document.MergePastedLists.docx");

See Also