public static void Run()
{
// ExStart:ListKeepSourceFormatting
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_JoiningAndAppending();
string fileName = "TestFile.DestinationList.doc";
Document dstDoc = new Document(dataDir + fileName);
Document srcDoc = new Document(dataDir + "TestFile.SourceList.doc");
// Append the content of the document so it flows continuously.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);
dstDoc.Save(dataDir);
// ExEnd:ListKeepSourceFormatting
Console.WriteLine("\nDocument appended successfully with lists retaining source formatting.\nFile saved at " + dataDir);
}
}