Hi guys, a lil help please i want to create a vba that compares two paragraphs for duplication. If duplication if found the sentence being duplicated will be highligted into different colors, example i found 5 duplicate, i want to see also five colors in the output so that i can easily count the number of duplicated sentence fragments or phrases. I found a code that do exactly what i need only that it cannot set a length of matching parts and it has only two colors for highlighting duplicates. I created a userform that contains 2 rich texbox, the first box is for the source and the second box is for the article to be compared in the source. I also put a command button "Compare". I also put a textbox so that i can input the minimum length of matching part(NMin).
Please download the attached file "DupTest" and run "compare" to see what I mean. The code actually works but only inside the document. The form I created has no code since thats my problem, integrating the code into the form. This will be the result if you will run the code in the attached document.
http://www.vbforums.com/images/ieimages/2012/02/1.png
If you can see the code only works inside the document itself. So the code compare the Page 1 of the document which is the SOURCE to Page 2 which is the Article.
I want to achieve the same result but using a form so it should be like this;
http://i44.tinypic.com/w5qi9.png
So when I click "Compare" the result should be like this (Note: That is only a screenshot of what should the result be.")
http://www.vbforums.com/images/ieimages/2012/02/1.png
So in general I want to integrate the code inside the file I attached into the Form.
Credits to Tony Jollans for the code.
