Comparing two documents and finding the accuracy

M

M.L.Srinivas

Hi,

How can i campare two documents and give the accuracy of
the compared one using vba.

Supposing that i have a master document and a test
document and i want to compare the master with test and
give the accuracy of test and also display the list of
mistakes done.

Can we do this?
Please Help.

M.L.Srinivas
 
H

Helmut Weber

Hi M.L.,
great challenge and can certainly be done,
but would require an extraordinary effort,
given, there is no previous selection of
very very very similar documents.
For pure text comparison, there is the old
DOS-Command "fc", which is complicated enough.
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
 
B

Bruce Brown

Why not just use Tools > Track changes? Wouldn't that be enough? See
Help for a description of how it works. P.S. If you do use Track
changes, make sure to 'Accept all changes' before saving the document.
They say a bunch of unaccepted changes can eventually cause serious
problems.
 
M

M.L.Srinivas

Hi Bruce,

I believe you got me wrong i'm talking baout comparing the
documents using vba not manually...Thanks for your time.


Hi Helmet,

I'm able to compare two documents thru vba, which i'm
doing it with the following code:


WordApp.ActiveDocument.Compare Name:=(path of the
comparing doc)
WordApp.ActiveDocument.SaveAs (New Path)

wordapp is word object. This is working fine, but i want
to know what are the mistakes in the test document and
calculate accuracy for it.

Atleast, I want to list out the mistakes.

Can u help me?

M.L.srinivas
 
W

Word Heretic

G'day "M.L.Srinivas" <[email protected]>,

Third party companies have spent many man years on achieving said
results. I would suggest their product cost is a tiny tiny fraction of
the real dev cost.


M.L.Srinivas said:
Hi Bruce,

I believe you got me wrong i'm talking baout comparing the
documents using vba not manually...Thanks for your time.


Hi Helmet,

I'm able to compare two documents thru vba, which i'm
doing it with the following code:


WordApp.ActiveDocument.Compare Name:=(path of the
comparing doc)
WordApp.ActiveDocument.SaveAs (New Path)

wordapp is word object. This is working fine, but i want
to know what are the mistakes in the test document and
calculate accuracy for it.

Atleast, I want to list out the mistakes.

Can u help me?

M.L.srinivas

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

If my answers r 2 terse, ask again or hassle an MVP,
at least they get recognition for it then.
Lengthy replies offlist require payment.
 
H

Helmut Weber

Hi M L.,
(I'd appreciate a real name),
maybe this could be a hint into the right direction,
though it seems still pretty complicated to me:
Dim p1 As Integer ' start position
Dim p2 As Integer ' next position
Selection.WholeStory
Selection.Collapse direction:=wdCollapseStart
p1 = Selection.start
Selection.NextRevision ' goto revision
' probably get revision text
p2 = Selection.start
While p1 <> p2 ' if selection was moved
p1 = Selection.start
Selection.NextRevision ' then next revision
' get revision text
p2 = Selection.start
Wend
This routine would guide you through all the revisions
in the compared document. It's up to you, to make up
a list of all the "Selection.NextRevision"s.
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, W98
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top