M
Mike Evraire
Hi,
I have been using the Document.Compare method in VB6 in the past and now that we've upgraded to Word 2003 here at my office, my application no longer displays the results of the compare method. In essence, I have two HTML documents, one which I will simply call "c:\Original.htm" and the other would be "c:\Revised.htm". When my form opens, I open the revised document and then I call the compare method, passing along my original document in parameter. Finally I save the resulting merged document as "c:\compared.htm" and then use my browser object to navigate to this new document. The new document contains the result from my merge but there is absolutly no formatting to indicate what was removed or added. I'm expecting to see some strike-throughs and some underlines and a bit of color but there's nothing.
Does anyone know what I need to add to my code to get this to work properly with Word 2003? Here's my VB6 code
Dim oWord As Word.Applicatio
Dim oDocument As Word.Documen
Set oWord = New Word.Applicatio
Set oDocument = oWord.Documents.Open("c:\Revised.htm"
Call oDocument.Compare("c:\Original.htm"
Call oDocument.SaveAs("c:\Compared.htm"
oDocument.Clos
'added this line because Word was asking if I wanted to save changes to Document1 before closin
oWord.Documents(1).Saved = Tru
oWord.Qui
Call htmlPreview.Navigate2("c:\Compared.htm"
Set oDocument = Nothin
Set oWord = Nothin
I have been using the Document.Compare method in VB6 in the past and now that we've upgraded to Word 2003 here at my office, my application no longer displays the results of the compare method. In essence, I have two HTML documents, one which I will simply call "c:\Original.htm" and the other would be "c:\Revised.htm". When my form opens, I open the revised document and then I call the compare method, passing along my original document in parameter. Finally I save the resulting merged document as "c:\compared.htm" and then use my browser object to navigate to this new document. The new document contains the result from my merge but there is absolutly no formatting to indicate what was removed or added. I'm expecting to see some strike-throughs and some underlines and a bit of color but there's nothing.
Does anyone know what I need to add to my code to get this to work properly with Word 2003? Here's my VB6 code
Dim oWord As Word.Applicatio
Dim oDocument As Word.Documen
Set oWord = New Word.Applicatio
Set oDocument = oWord.Documents.Open("c:\Revised.htm"
Call oDocument.Compare("c:\Original.htm"
Call oDocument.SaveAs("c:\Compared.htm"
oDocument.Clos
'added this line because Word was asking if I wanted to save changes to Document1 before closin
oWord.Documents(1).Saved = Tru
oWord.Qui
Call htmlPreview.Navigate2("c:\Compared.htm"
Set oDocument = Nothin
Set oWord = Nothin