Outlook 2010 VSTO - 窗体区域中的标准 Office 图标
将显示标准 Outlook 图标的按钮添加到功能区非常简单。将按钮的属性 OfficeImageId 设置为已知 ID(例如“EncryptMessage”)即可完成。有关可能值的完整列表,请参阅Office 2010 加载项:图标库< /a>.
现在我的问题是,我可以在表单区域中实现相同的功能吗?我的意思是,添加一个显示标准 Office 图标的 PictureBox?显然没有 OfficeImageId 属性,但也许有人知道解决方法。
Adding buttons showing standard Outlook icons to a Ribbon is pretty straightforward. Set the button's property OfficeImageId to a known ID (e.g. "EncryptMessage") and you're done. For a complete list of possible values see Office 2010 Add-In: Icons Gallery.
Now my question is, can i archieve the same thing in a Form Region? I mean, adding for example a PictureBox showing that standard Office icon? Obviously there is no OfficeImageId property, but perhaps someone knows a workaround.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您提供的链接指向 Word 2010 文档。到目前为止,我一直在使用 Excel 2007 文档,其功能区扩展显示所有内置图标(“其他人下载的内容”部分中的“2007 Office System 加载项:图标库”)。在此工作簿中,您可以单击图标,并且一个VBA窗体勇敢地显示了16x16和32x32的图标。
这只是一个带有两个图片框的VBA窗体。
希望这可以帮助您获取图像。
The link you provided goes to a Word 2010 document. I was using until now the Excel 2007 document with a ribbon extension showing all the built-in icons ("2007 Office System Add-In: Icons Gallery" in the "What others download section). In this Workbook you can click on an icon, and a VBA form shows the 16x16 and the 32x32 icon bravely.
It's just a VBA form with two picture boxes. The code is as follows:
I hope that this helps you to get the image.
要完成上述帖子 MSDN 论坛上的这篇文章,这里是VB.Net 答案:
获取
IPictureDisp
扩展以转换为
Drawing.Image
分配给控件
注意:我不知道为什么
If CType(MyIPicture.Type , Integer) = 1
是必需的。欢迎任何见解..!另外,同一篇文章引用了 System.Windows.Forms.AxHost,但似乎没有在任何地方使用它?To complete the above post with this post on MSDN Forum, here is a VB.Net answer:
Get the
IPictureDisp
Extension to convert into a
Drawing.Image
Assign to a control
Note: I have no idea why
If CType(MyIPicture.Type, Integer) = 1
is required. Any insight is welcome.. ! Also, the same post refers toSystem.Windows.Forms.AxHost
, but does not seem to be using it anywhere?