Hidden Text removal

Is there a way to remove hidden text from the document. (from the doc file)
any ideas would be appreciated?

Hi there,
Thanks for your inquiry.
I think the code example on this page here might be what you are looking for. If not, could you please clarify how exactly you want the hidden text to be removed.
Thanks,

well I really appreciate that. But i feel that sample code was a bit complex for my level. so I was wondering if there are any other examples or some other approach for that solution.

Hi

Thanks for your request. You can try using the following code to remove hidden text:

// Open document
Document doc = new Document(@"Test001\in.doc");
// Get all runs.
Node[] runs = doc.GetChildNodes(NodeType.Run, true).ToArray();
// Remove hidden runs.
foreach(Run run in runs)
{
    if (run.Font.Hidden)
        run.Remove();
}
// Save the result.
doc.Save(@"Test001\out.doc");

However, code suggested by Adam is better because covers more cases.
Best regards,

Hi this is exactly what i wanted. thanks mate. I really appreciate that.
and thanks for aspose team.

Hi Adam,

The code example on the above mentionned page could help me but is not accessible. I get the Page Not Found Error by clicking the link “here” to access the url address “https://reference.aspose.com/words/net/aspose.words/font/hidden/

Could you please give me access to that page ?

thanks in advance

Hi Stephane,
That page was pointing to https://reference.aspose.com/words/net/aspose.words/font/hidden/
You can use the above mentioned example or open the CHM file from the directory where Aspose.Words for .NET has been installed and check Aspose.Words.Font.Hidden property for a detailed example.
Best Regards,