title: How to save ImageMSO icon from Microsoft Office 2007?
body: <p>I found a lot of nice icons from Microsoft Office 2007. Do you any idea for extract &amp; save all icons as PNG files by using VBA?</p>
  
  <p><a href="http://rabu4g.bay.livefilestore.com/y1p2SF1q63YjDjPNmK4nYMW2644r9AO2aAsE__vBYznTeXD0b4SJUU0O07fxPD0r7aO_83gCJ-8OfcOQsFKG0fQMRnTEneBU1TI/Capture.PNG">Partial ImageMSO http://rabu4g.bay.livefilestore.com/y1p2SF1q63YjDjPNmK4nYMW2644r9AO2aAsE__vBYznTeXD0b4SJUU0O07fxPD0r7aO_83gCJ-8OfcOQsFKG0fQMRnTEneBU1TI/Capture.PNG</a></p>
  
  <p>The following code is code which is used to get image from ImageMSO. </p>
  
  <pre><code>Application.CommandBars.GetImageMso([name], [width], [height])
  </code></pre>
  
  <p>I can display all as PictureBox control and save excel file as web page. However, every icons is very low quality.</p>
  
  <p>Moreover, I try to create C# Excel Add-in project for exporting as Bitmap object by using the following code. But I found that it can't export as semi-transparent PNG.</p>
  
  <pre><code>stdole.IPictureDisp p = Application.CommandBars.GetImageMso(fileName, size, size);
  Bitmap b = Bitmap.FromHbitmap((IntPtr)p.Handle, (IntPtr)p.hPal);
  </code></pre>
  
  <p>PS. I want to save all icons as PNG format because I need to use semi-transparent feature of it. It allow me to use all icons on most background color more than white background.</p>