-
To the OP, Deedii --
Short answer: what you want isn't easy, and it might not be possible. I would investigate using Word's native comparison feature (even in Word 2003, it isn't bad).
Rich Text form controls are possible on VBA userforms, but you're trying to reinvent the wheel which has been programmed by Microsoft. You just want to compare two bits of text (source and article), to see what is similar.
The problem is, you're trying to add a feature (and thus, your brute force method) of getting an overall length of a string to compare. Why do you need to specify the "minimum length of matching parts"? In the document comparison world, this falls under the concept of "readability."
Are you trying to see if someone has plagiarized you?
I think we need a bigger picture of what you *really* want to accomplish in order to give you an answer.
I could, for example, program a dialog which allows you to
1. Paste text into a text box called "source"
2. Paste other text into a text box called "article"
3. Click "compare"
4. See a document which uses Word's native redlining to show you the comparison.
But you could just as easily:
1. Paste source text into a new, blank document you have saved called Source.doc
2. Paste article text into a new black document you have saved called Article.doc.
3. Run the native redline comparison on those two documents, and analyze the results.
And you don't need any coding what-so-ever. And this will work in version Word 2000 on up (if memory serves).
So... what version of Word are you using?
And what do you want to do after you look at the results of your "comparison" function?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules