如何从Microsoft Office 2007保存ImageMSO图标? [英] How to save ImageMSO icon from Microsoft Office 2007?

查看:821
本文介绍了如何从Microsoft Office 2007保存ImageMSO图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Microsoft Office 2007中发现了许多漂亮的图标。你对提取物有什么想法吗?使用VBA将所有图标保存为PNG文件?




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.livefilestore.com/y1p2SF1q63YjDjPNmK4nYMW2644r9AO2aAsE__vBYznTeXD0b4SJUU0O07fxPD0r7aO_83gCJ-8OfcOQsFKG0fQMRnTEneBU1TI/Capture.PNG

The following code is code which is used to get image from ImageMSO.

Application.CommandBars.GetImageMso([name], [width], [height])

I can display all as PictureBox control and save excel file as web page. However, every icons is very low quality.

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.

stdole.IPictureDisp p = Application.CommandBars.GetImageMso(fileName, size, size);
Bitmap b = Bitmap.FromHbitmap((IntPtr)p.Handle, (IntPtr)p.hPal);

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.

解决方案

I use ImageMso quite frequently in my Excel development. Having stumbled on this post, I took it a step further and put a package together to visually search, extract and save icons from Microsoft Excel as a file or copy and paste (with alpha channel transparency) to another application. I also compiled a list of 8,899 distinct ImageMso names from the various sources. I hope others can find this useful.

Microsoft Office Icons (ImageMSO) Gallery & Extraction

这篇关于如何从Microsoft Office 2007保存ImageMSO图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆