I'd like to ask you one thing that how i can search the words in doc ?
for instance, there're lots of pages in this doc, and i like to search the word like "TABLE".
i wanna get focusing when i push the "<" or ">" button as you see
Thanks for helping me.
here's the picture under below.
and here's my code :
- Code: Select all
Dim document As New Document()
Dim temp() As Object = Nothing
Dim i As Integer = 0
If RichTextBox1.Text = "" Then
Return
End If
document.LoadFromFile("C:\\Users\\bangjh\\Downloads\\14S-99999_86.doc", FileFormat.Docx)
'Find Word
Dim textSelections() As TextSelection = document.FindAllString(RichTextBox1.Text, True, True)
'Highlight Word
For Each selection As TextSelection In textSelections
selection.GetAsOneRange().CharacterFormat.HighlightColor = Color.Cyan
Next selection
document.SaveToFile("Find.docx", FileFormat.Docx)
'Save and Launch
System.Diagnostics.Process.Start("Find.docx")