I have encountered a bug. When using Range.Replace()
to insert multiple paragraph breaks (&p
) into a list item, a duplicate list item is created. Input and output documents are attached. Here is the code to create the output document from the input document to recreate the bug:
var find = ",";
var replace = "&p&p";
var document = new Document(/path/to/input/file);
document.StartTrackRevisions("Author");
document.Range.Replace(find, replace);
document.StopTrackRevisions();
document.Save(/path/to/output/file);
ListsAndLinebreaks2.docx (12.9 KB)
ListsAndLinebreaks2.docx (10.7 KB)