How to save ImageMSO icon from Microsoft Office 2007?

前端 未结 4 2094
面向向阳花
面向向阳花 2021-02-06 01:58

I found a lot of nice icons from Microsoft Office 2007. Do you any idea for extract & save all icons as PNG files by using VBA?

Partial ImageMSO http://rabu4g.bay.li

4条回答
  •  不知归路
    2021-02-06 02:13

    All of the PNG files can be found here These are all in PNG format already. Good programming! (a nice ZIP archive is also available Here) The ZIP archive contains all 17 of the Excel icons.

    When you use the GetImageMso method, you end up with an IPicture interface to the object. The IPicture interface accesses the icon suitable for saving to a file in the original format - an .ICO, .WMF or a .BMP The PNG format is not supported. The following links explain why this is not directly possible:

    http://msdn.microsoft.com/en-us/library/aa434604.aspx (msoGetImageMso method) http://msdn.microsoft.com/en-us/library/ms680761%28VS.85%29.aspx (IPicture Interface) http://msdn.microsoft.com/en-us/library/ms694504%28VS.85%29.aspx (Save As File method)

    However, using a more complex approach will yield what you want:

    http://blogs.msdn.com/mshneer/archive/2007/10/10/preserving-transparency-when-rendering-office-icons.aspx

提交回复
热议问题