title: How to copy Text from one Word Document to another Word Document using c#
body: <p>I want to copy one word document to another word document dynamically. This process can be done in Button Click. Document (docs) contains text, I want to copy it to document (docs2)</p>
  
  <pre><code>public void ReadMsWord()
      {
          string filePath = null;
          OpenFileDialog file = new OpenFileDialog();
          file.Title = "Word File";
          file.InitialDirectory = "c:\\";
          file.RestoreDirectory = true;
          if (file.ShowDialog() == DialogResult.OK)
          {
              filePath = file.FileName.ToString();
          }
          try
          {
              //Microsoft.Office.Interop.Word.Application Oword = new Microsoft.Office.Interop.Word.Application();
              //Oword.Visible = true;
              var templatepath = filePath;
              var wordapp = new Microsoft.Office.Interop.Word.Application();
              var orgnldoc = wordapp.Documents.Open(templatepath);
              orgnldoc.ActiveWindow.Selection.WholeStory();
              orgnldoc.ActiveWindow.Selection.Copy();
              var newdcmnt=new Microsoft.Office.Interop.Word.Document();
              newdcmnt.ActiveWindow.Selection.Paste();
              newdcmnt.SaveAs(@"C:\Users\Documents\TestDoc2.docx");
              System.Runtime.InteropServices.Marshal.ReleaseComObject(wordapp);
              System.Runtime.InteropServices.Marshal.ReleaseComObject(orgnldoc);
              System.Runtime.InteropServices.Marshal.ReleaseComObject(newdcmnt);
              GC.Collect();
          }
          catch (Exception ex) { MessageBox.Show(ex.ToString()); }
      }
  </code></pre>