title: Open Ms Word in write mode using microsoft.office.interop.word
body: <p>I am trying to open a MS Word Document through C#. But the open method is opening the document in a read-only mode. I want the file to be opened in write mode without creating another copy of i, so that I can save the changes to Database.
  Here is the code for opening the file.</p>
  
  <pre><code>public void def()
  {
      Word.Application app = new Word.Application();
      Word.Document dd = app.Documents.Open("C:\\hi12.docx", ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing,ref repair);
      dd.TrackRevisions = true;
      dd.CommandBars["Reviewing"].Controls["Reviewing Pane"].Execute();
      int count = dd.Words.Count;
      dd.Close(ref Nothing, ref format, ref Nothing);
  }
  </code></pre>