Click here to Skip to main content
15,889,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a one ms word document files(2007) save as document.doc and one excel file save a word_list.xls.

If there is any sentence like example "My name is mayank" in document.doc file and in excel file in r1c1 i write "My", so I want all the sentence containing "My" copied in new excel file (extract.xls) in r1c1.

Please help me.
Thanks
Posted
Updated 28-Dec-11 22:28pm
v2

1 solution

You can find all sentences from a Word document using Interop, see: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.sentences.aspx[^]

One possibility is to loop all the returned ranges and search for specific words to create the list of sentences containing the desired word(s).
 
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