title: Microsoft.Office.Interop.Word error opening the document file in code
body: <p>Please can someone help with a problem opening a Word2003 file in code using <code>Microsoft.Office.Interop.Word</code>?</p>
  
  <p>My code is below. The document is created fine and if I pause the code after creating it I can open the file via explorer. The code freezes on the final line. At this point one can see a file locking metafile appear in explorer as well as the original. There is no error generated that I can see. Maybe there is an invisible dialog but otherwise I'm stumped.
  Thanks in advance.</p>
  
  <ol>
  <li><p>Firstly write a byte array to a file   </p>
  
  <pre><code>var tmpFile = @"C:\donkey.doc";
  File.WriteAllBytes(tmpFile, binary_document);
  </code></pre></li>
  <li><p>Open the file as a document object of some type</p>
  
  <pre><code>Application app = new Application();
  Document CurrDoc = app.Documents.Open(@"C:\donkey.doc");
  </code></pre></li>
  </ol>
  
  <p>Solution to freeze was re-installing Word2003 although I have actually abandoned the approach altogether due to the server issues identified here <a href="http://support.microsoft.com/kb/257757" rel="nofollow">http://support.microsoft.com/kb/257757</a>. Thanks for all help.</p>