Click here to Skip to main content
15,896,489 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am reading a ms word document using c#. it reads all characters including tab,white space,empty string,special characters, numbers. i want only and exactly the words. can anyone provide me an optimal solution. answers with coding will be more helpful. thanks in advance..
Posted

Use Words member[^] of Document[^] object.

Note:

Each item in the Words collection is a Range object that represents one word. There is no Word object.


Steps to do:
1) Create an instance of MS Word.
2) Open existing document.
3) Go through the collection of Words (use for each loop).
4) Close the document.
5) Close an instance of MS Word.

That's all!

Word tasks[^]
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900