title: How can I open Word document without having to save it first on the Server?
body: <p>I am generating word documents from a template, by customizing it for the user using merge field. For example: Name: "User's name". Right now I save the documents on the server using </p>
  
  <pre><code>object miss = System.Reflection.Missing.Value;
              object oDocName = "C:\\Users\\admin\\Desktop\\test002.doc";
              wordDoc.SaveAs(ref oDocName, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss);
              ((_Application)wordApp).Quit(ref miss, ref miss, ref miss);
  </code></pre>
  
  <p>then, i make the document available for download:</p>
  
  <pre><code>protected void download_Click(object sender, EventArgs e)
  { 
      FileStream fileStream = new FileStream("C:\\Users\\ebimbari\\Desktop\\test002.doc", FileMode.Open);
  
      int fileSize = (int)fileStream.Length;
      byte[] Buffer = new byte[fileSize];
  
      fileStream.Read(Buffer, 0, fileSize);
      fileStream.Close();
  
      Response.ContentType = ContType("C:\\Users\\admin\\Desktop\\test002.doc");
      Response.BinaryWrite(Buffer);
      Response.AddHeader("content-disposition", "attachment;filename=\"" + "form" + ".doc");
      Response.End();
  }
  </code></pre>
  
  <p>The problem is that I don't want the form to be saved on the server. Can I directly open the document of make it avaiable for download? I'm using <strong>Microsoft.Office.Interop.Word</strong></p>
  
  <p>Thanks.</p>