0

i have a richtextbox ,a textbox and a button in c# windows form.i also have a 100 page ms-word .doc file .i want to make an application which displays only that page in richtextbox which is containing the exact word written in textbox. for example: if i write "hello" in textbox and click on search button then richtextbox should display all content of page which is having "hello" word.

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by ANKUR1806
1

You'll probably have to use COM with Word, aka Word Interop; here's the reference. Note that this requires particular versions of Word to be installed on the client machines. I'm sure there are ways to determine and utilize the version at runtime, although I've never had the need to look into it.

You'll be able to load plain text pretty easily. If you want, you can get formatting information using the Interop libraries; however, it would be pretty near impossible to exactly match the formatting used by Word.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.