Hi
I’m extracting the text from Word documents and noticed that wherever there is a docproperty it is getting included in the output text. Is there a way to disable this so rather than:
Dear Mr DOCPROPERTY “SURNAME” * MERGEFORMAT Jones
I get
Dear Mr Jones
Obviously I can parse this out if I need to but would prefer not to have to if there is a simple setting?
Thanks
Si
Hi Simon,
Thanks for your inquiry. Please download the latest version of Aspose.Words from here (13.7.0) and use the following code snippet to obtain the text representation of Paragraphs:
NodeCollection nodeColl = doc.GetChildNodes(NodeType.Paragraph, true);
for (int i = 0; i <nodeColl.Count; i++)
{
Paragraph para = (Paragraph) nodeColl[i];
string text = para.ToString(SaveFormat.Text);
}
I hope, this helps.
Best regards,
Thanks I will give this a try.
Si