Dear Support!
I would like to hide the text in the word document if it is highlighted using C# aspose.words.
Thank you so much!
Attached sample file.HideHighlight_test_file.zip (13.9 KB)
Dear Support!
I would like to hide the text in the word document if it is highlighted using C# aspose.words.
Thank you so much!
Attached sample file.HideHighlight_test_file.zip (13.9 KB)
You can use the following code example to find the highlighted text and set font formatting as hidden. Hope this helps you.
Document doc = new Document(MyDir + "HideHighlight_test_file.docx");
foreach (Run run in doc.GetChildNodes(NodeType.Run, true))
{
if (run.Font.HighlightColor != Color.Empty)
run.Font.Hidden = true;
}
doc.Save(MyDir + "20.8.docx");