title: How I can get embedded attachments out of an Outlookmailitem? -> Get Attachments out of *.msg files
body: <p>at the moment I am delveoping an Outlook-addin (Outlook 2007) in C#, 
  and I need to save the embedded attachments (usually images in BMP format).</p>
  
  <p>I meen the attachments which are embedded by pasting ([CRTL]+[V])</p>
  
  <p>When I try to save all attachments:</p>
  
  <pre><code>foreach (Outlook.Attachment a in mail.Attachments)
  {
  
   a.SaveAsFile(path);
  
  }
  </code></pre>
  
  <p>I've got a ComException (if the attachment is embedded else it will save it properly)</p>
  
  <p>May someone help me - please ;-D</p>
  
  <hr>
  
  <p><em>EDIT</em>
  At the moment I am thinking about a workaround.
  I've tried to export the "OLE" object (I think it is ole) but it wasn't successful.</p>
  
  <p>Now I am testing around with the *.msg export. If you open the *.msg file with 7zip fileexplorer you will get some files and folders. 
  Inside an "<em>attachment</em>" folder you can find a "CONTENT" file, which is the embedded BMP file. But I am not able to access to *.msg with GZip (in .net).
  I also tried the 7zip SDK <a href="http://7-zip.org/sdk.html" rel="nofollow">sample</a> but I've got an error - "System error: Incorrect function".</p>
  
  <p>If I try Gzip in .net - I'll get an exception "bad magic number" or something - so the problem is the filehead.</p>
  
  <p>Could someone explain me how I can extract the files?</p>