highlighting text in Docx using c#
I need to highlight a sentence in docx file, I have this code, and its working fine for many documents , but i noticed that for some document the text inside the document is set word by word, not whole sentence, I mean each word with its own Run, so when searching for that sentence, it is not found because it is word by word in the docx. NOTE: I am working with Arabic text. private void HighLightText_userSentence(Paragraph paragraph, string text, string title, string author, decimal percentage, string _color) { string textOfRun = string.Empty; var runCollection = paragraph.Descendants<Run>();