Click here to Skip to main content
15,896,441 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we have a application where we are getting the words written in Msword and splitting the words and comparing the words with the words in the dictionary and coloring them . now we got a requirement that a word paste should be inserted between every 5 words in Msword .Assume below example is a sentence written in MSword .

Example- original text:
this is word used for example. we are showing how the application works...

Example- "paste"inserted text
this is word used for "paste" example. we are showing how "paste"the application works...

like in the above example i have to insert "Paste" for every words.
Posted

You are reposting the same question that is clearly an homework.
We don't provide off the shelf code especially for homeworks.
Let us see what are your efforts, where you get stuck and people here will provide help and support...
 
Share this answer
 
Here's some hints:

1. Microsoft.Office.Interop.Word
2. String.Split
3. for i = 0; i < words.count; i+=5
 
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