title: How to resize file inserted into word document (autoresize)
body: <p>I write (c#, .net framework 4.0) Add-in for Enterprise Architect and I have problem with formating file inserting to Word document.
  This file I'm reading from Element.LinkedDocument (Repository.GetElementByID(kl.ElementID).GetLinkedDocument()), inserting to doc (Range.InsertFile()) and it is working.
  But sometimes size (vertical or horizontal) of file in doc is to big, and I have to resize it to maximum in page document (autoresize, if its possible). Do you have any ideas how can I expand my code?</p>
  
  <pre><code>String linkedDocument = Repository.GetElementByID(kl.ElementID).GetLinkedDocument();
  if (linkedDocument.Length &gt; 0)
  {
    String tmpFileName = System.IO.Path.GetTempFileName() + ".rtf";
    using (StreamWriter outfile = new StreamWriter(tmpFileName))
      outfile.Write(linkedDocument);
  
    dokMD.Paragraphs.Add();
    par = dokMD.Paragraphs.Last;
    par.Range.ListFormat.RemoveNumbers(WdNumberType.wdNumberAllNumbers);
    par.set_Style("Normal");
    object brak = System.Reflection.Missing.Value;
    par.Range.InsertFile(tmpFileName, brak, false);
    //... autosize
    File.Delete(tmpFileName);
    System.IO.File.Delete(tmpFileName);
  }
  </code></pre>