Hi!
paragraph.ToTxt();
Marie
Hi!
paragraph.ToTxt();
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. I think, you can use DocumentVisitor to achieve this. You can find a very good example, which demonstrates the technique, here:
Hope this helps. Please let me know in case of any issues.
Best regards.
Hi Alexey,
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. Not exactly because paragraphs can also contain fields. Each field consists of FieldStart, FieldEnd, FieldSeparator nodes and field code, field value text. Field code and field value are also represented by Runs. So the text returned by your code will also contain field codes, which, I suppose, are unnecessary in your case.
Best regards.
Hi!
It seems to me that Marie3’s solution is now correct, because the current version of Aspose.Words keeps FieldSeparators, etc., in their own type of child nodes. That is, it seems to me that as it stands now, traversing all the Runs directly under a paragraph should return only the actual text of the paragraph (including deletions and insertions); anything else (comments, fields, etc.) would be excluded.
Please advise.
Hi Avi,
NodeCollection comments = clonedPara.GetChildNodes(NodeType.Comment, true);
comments.Clear();
Console.WriteLine(clonedPara.ToString(SaveFormat.Text));