We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

change the hidden Fontattribute to unhidden

Hello,

I want to use DocIO to changethe FontStyle Attribute Hidden to unhidden. How can I do that ?

The other possibility would be to extract a text between to hidden text and save it in Word Format (doc). Would this be possible ?

Greetings Oliver


1 Reply

BP Bhuvaneswari P Syncfusion Team September 10, 2008 12:50 PM UTC

Hi Oliver,

Yes, it is possible to show the already hidden characters by using the Character format Hidden property. Please refer the below code snippet how it can be done

[C#]

WordDocument doc = new WordDocument("sample.doc");

//Enumerate the document elements starting from sections
foreach (IWSection sec in doc.Sections)
{
foreach (IWParagraph para in sec.Paragraphs)
{
for (int i = 0; i < para.ChildEntities.Count; i++)
{
Syncfusion.DocIO.DLS.IParagraphItem pItem = para[i] as Syncfusion.DocIO.DLS.IParagraphItem;

if (pItem is WTextRange)
{
WTextRange doctext = pItem as WTextRange;
if (doctext.CharacterFormat.Hidden == true)
{
doctext.CharacterFormat.Hidden = false;
}
}


}
}
}


Please try this code and let us know if this helps you.

Best Regards,
Bhuvana




Loader.
Live Chat Icon For mobile
Up arrow icon