I need to compare two office documents, in this case, two-word documents and provide a difference that is somewhat similar to what is displayed in SVN. Not so, but at least differences can be distinguished.
I tried using office dll COM and got this far.
object fileToOpen = (object)@"D:\doc1.docx"; string fileToCompare = @"D:\doc2.docx"; WRD.Application WA = new WRD.Application(); Document wordDoc = null; wordDoc = WA.Documents.Open(ref fileToOpen, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); wordDoc.Compare(fileToCompare, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
What are some tips for further advancement? It will be a web application with a lot of hits. Is using the office com object the right way, or are there other things that I can look at?
source share