如何在PowerPoint 2013

时间:2017-03-27 04:45:09

标签: c# vsto

我想要自定义右键菜单,只使用visual studio(VSTO)。

所以..我的代码是

foreach(CommandBar cb in Application.CommandBars)
        {
            if (cb.Name.IndexOf("Shapes") > -1)
            {
                cb.Reset();
                m_oBarPopup = (CommandBarPopup)cb.Controls.Add(Office.MsoControlType.msoControlPopup, 1, missing, 1, missing);
                m_oBarPopup.Caption = "TEST";
                m_oBarPopup.BeginGroup = true;
                CommandBarButton popup_child = (CommandBarButton)m_oBarPopup.Controls.Add(Office.MsoControlType.msoControlButton);
                popup_child.Caption = "TEST Button";
                popup_child.Click += new _CommandBarButtonEvents_ClickEventHandler(clickTest);

            }                
        }

代码不是错误。但没有显示自定义菜单。 如何在ppt形状的右键菜单中显示自定义菜单? 非常感谢您的帮助!

0 个答案:

没有答案