title: Microsoft Interop: Word compare .doc with .docx c#
body: <p>I've developed an app that gets two documents and then opens Word to compare changes between them. It works perfectly with 2 .docx or 2 .doc but if I try to compare .doc with .docx it opens <em>only</em> the .doc in compatibility mode and doesn't do a comparison. Here is the code I use to compare:</p>
  
  <pre><code>  object fileToOpen = (object)rutaVersion1;
    string fileToCompare = rutaVersion2;
  
    object missing = Type.Missing;
  
    doc1 = wordApp.Documents.Open(fileToOpen, Visible: true);
    doc1.TrackRevisions = true;
    doc1.ShowRevisions = true;
    doc1.PrintRevisions = true;
  
    wordApp.ActiveDocument.Compare(fileToCompare, missing, WdCompareTarget.wdCompareTargetCurrent, true, true, false, false, false);
    wordApp.Activate();
    wordApp.WindowState = WdWindowState.wdWindowStateMinimize;
    wordApp.WindowState = WdWindowState.wdWindowStateMaximize;
  </code></pre>
  
  <p>rutaVersion1 points to .doc file, and rutaVersion2 to .docx. Using Office365 but having the same issue with other Office version. If I manually compare them it works.</p>
  
  <p>Thanks for your time.</p>