Hi
Thanks for your inquiry. I think that you can try using the following
code.
Document doc = new
Document(@"276_106424_tanquan\in.doc");
ArrayList list = new ArrayList();
NodeCollection collection =
doc.GetChildNodes(NodeType.Paragraph, true);
foreach (Paragraph
pararagraph in collection)
{
Node
node = pararagraph.NextSibling;
if
(node != null && node.ToTxt() == "\r\n")
{
node = node.NextSibling;
while
(node != null && node.ToTxt() == "\r\n")
{
if
(!list.Contains(node))
list.Add(node);
else
break;
node = node.NextSibling;
}
}
}
foreach(Node
node in list)
{
node.Remove();
}
doc.Save(@"276_106424_tanquan\out.doc");
I hope that this will help you.
Best regards.