title: Inserting one document to another Microsoft.Office.Interop.Word
body: <p>I am dealing with Word VSTO add-in. I wrote a code that inserts one document to another. I have two different approaches. </p>
  
  <p>1) <code>Copy</code>/<code>Paste</code> </p>
  
  <pre><code>var app = new Word.Application();
              var MyDoc = app.Documents.Add(@"C:\install\CSharp\Plank.dotm");
              MyDoc.ActiveWindow.Selection.WholeStory();
              MyDoc.ActiveWindow.Selection.CopyFormat();
              Word.Document doc = Globals.ThisAddIn.Application.ActiveDocument;
              doc.Activate();
              doc.ActiveWindow.Selection.PasteFormat();
  </code></pre>
  
  <p>2) <code>InsertFile()</code></p>
  
  <pre><code>var app = new Word.Application();
  
              var MyDoc = app.Documents.Add(@"C:\install\CSharp\Plank.dotm");
              Word.Document doc = Globals.ThisAddIn.Application.ActiveDocument;
              doc.Activate();
                         //Taking margins
              float TopMargin = MyDoc.PageSetup.TopMargin;
              float RightMargin = MyDoc.PageSetup.RightMargin;
              float LeftMargin = MyDoc.PageSetup.LeftMargin;
              Globals.ThisAddIn.Application.Selection.InsertFile(@"C:\\install\CSharp\Plank.dotm", Link: false, Attachment: false);
  </code></pre>
  
  <p>At the first approach the line <code>PasteFormat()</code> is not working, telling me that text properties were not copied. (If I use just <code>Copy()</code> and <code>Paste()</code> it works.) Even if I paste manually I get what I want.</p>
  
  <p>The second approach works, but it doesn't take text formatting. So I get the text in some other format and size which differs from the original.</p>
  
  <p>QUESTION is: How can I preserve original font formats? I tried to insert a file in Word manually. And I can't get the original text formatting there either. Maybe it is a wrong approach?</p>