2011年1月4日星期二

Office2007扩展Ribbon界面

参考资料:
http://sourcedaddy.com/ms-excel/customizing-existing-tab.html
http://openxmldeveloper.org/articles/customuieditor.aspx
具体过程两篇参考文献中都有,这里只讲要点:
1. 在什么文件中扩展Ribbon?
If you only want the custom Ribbon interface available for a specific document, create a macro-enabled document (.docm, .xlsm, or .pptm).
  • If you want the custom Ribbon interface available only for any document based on a particular template, create a macro-enabled template (.dotm, .xltm, or .potm).
  • If you want the custom Ribbon interface available for any open document in Word, modify the Normal template.
  • If you want the custom Ribbon interface available for any open document in Excel or PowerPoint, you need to create an Add-in file (.xlam or .ppam).
2. Office2007的文件格式实际是一个标准zip文件,可以通过修改扩展名后进行文件的添加、删除和修改
3. CustomUI Editor可以简化扩展的过程,包括图标
4. CustomUI Editor不支持中文,因此需要从文档包中把CustomUI.xml取出来,输入中文,保存时选择为unicode编码(UTF-8),然后去替代文档包中的该UI配置文件
5.图标的添加,如果是自定义文件图标的话,应该用image而不是imageMso
附件解压缩后是一个制作好的xlam文件,将其放到用户目录的\AppData\Roaming\Microsoft\AddIns下,并在Excel选项中启用该Add-in即可生效

http://u.115.com/file/f0b4513719

没有评论:

发表评论