title: Delphi Ole Automation - Save Word97-2003 file in Word 2010 without Save As dialog
body: <p>I'm trying to save a Word 97-2003 document (.doc) using Delphi 6 and Word 2010.</p>
  
  <p>Before Word 2010 everything worked fine with </p>
  
  <pre><code>WordDoc.SaveAs(FileName := FileName, FileFormat := wdFormatDocument);
  </code></pre>
  
  <p>where <code>FileName := 'c:\doc.doc'</code></p>
  
  <p>Now, Word 2010 presents an Save Dialog and I'm not sure why. 
  I've tried the new SaveAs2 method </p>
  
  <pre><code>WordDoc.SaveAs2(FileName := FileName, FileFormat := wdFormatDocument, CompatibilityMode:= wdWord2003);
  </code></pre>
  
  <p>but with the same result.</p>
  
  <p>Oddly, </p>
  
  <pre><code>WordDoc.SaveAs2(FileName := FileName, FileFormat := wdFormatDocumentDefault, CompatibilityMode:= wdWord2003);
  </code></pre>
  
  <p>works fine, without the Save As dialog, but the saved file has Word 2010 format and .doc extension, which will confuse old Word versions.</p>
  
  <p>So, any ideas how I can save a file in old document Word format using Word 2010 without Save As dialog popping up?</p>