Word 2010的表上下文菜单 [英] Table Context Menu for Word 2010

查看:87
本文介绍了Word 2010的表上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为Word 2010创建一个上下文菜单。我正在使用下面的代码,但在编辑表时不起作用,即在表格单元格中输入文本时不显示上下文菜单。 br />
我用以下contextMenu idMsos尝试了这个:ContextMenuTable,ContextMenuTableCell,ContextMenuTableCellWhole和ContextMenuTableCellWholeLinked;但是仍然不起作用。

编辑表时不显示上下文菜单。



我做错了什么?谢谢。



XML:

I want to create a context menu for Word 2010. I'm using the code below, but doesn't work when editing a table, i.e., the context menu doesn't show when entering text inside a table cell.
I tried this with the following contextMenu idMsos: ContextMenuTable, ContextMenuTableCell, ContextMenuTableCellWhole, and ContextMenuTableCellWholeLinked; but still doesn't work.
The context menu doesn't show when editing table.

What am I doing wrong? Thanks.

XML:

<contextMenus>
      	<contextMenu idMso="ContextMenuText">
			<menuSeparator id="CMenuSeparator1" />
			button id="BtnCMenu1" label="Block Text" imageMso="TextToolMenu" visible="true" onAction="StyleBlockText" />
      	</contextMenu>
</contextMenus>





VBA:



VBA:

Sub StyleBlockText(control As IRibbonControl)
    Selection.Style = ActiveDocument.Styles("My Style")
End Sub

推荐答案

您没有指定您有什么类型的问题。



这是一个完整的教程:自定义Office 2010中的上下文菜单 [ ^ ]

加载项,列出上下文菜单控件的ID(idMSO)是现已推出 [ ^ ]
You did not specify what kind of issue do you have.

Here is a complete tutorial: Customizing Context Menus in Office 2010[^]
and Add-in that lists the IDs (idMSOs) of context menu controls is now available[^]


这篇关于Word 2010的表上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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