visual studio 2010 - Cannot add actions to custom buttons on word "Text" popup menu -


I have a real hard time I have visual studio I am using 2010 Beta, a word template in Visual Basic.Net (.dotm)

I'm trying to add my own buttons on the text's popup / context menu of the word.

can not be found macro or been disabled in your macro security settings

I: But if I use .OnAction property, I got an error in the words stating the following Get the message 'I'm assuming this sub is not receiving the error because I can not find the sub I'm trying to call (the name is correct and it stays in the same class).

I have tried a different approach which is withEvents, although the last button associates the event with I add to the menu bar.

A third approach I was attempted was AddHandler, so that no one else at a fire once.

Here is the code I use:

  activeDoc.CommandBars then each myItem myItem.Type = Microsoft.Office.Core.MsoBarType.msoBarTypePopup and myItem. Name = officeMenuName then shortMenu = Me.activeDoc.CommandBars (myItem.Index) .Controls shortPopup = shortMenu.Add (type = OfficekMsoControlTypekmsoControlPopup, temporary: = this shortPopup with good reason) .Caption = menuName. With I = LBound (menuItems) = ITemail (menuItems) shortItem = shortPopup.Controls.Add (type = OfficekMsoControlTypekmsoControlButton, temp = true) ShortItem with AddHandler shortItem.Click, AddressOf shortMenuNu. Caption = menuHeader (i) .Visible = true .Tag = menuItems (i) .OnAction = "shortMenuItem_Click" 'where the deputy's name is in the same class or AddHandler shortItem.Click, shortItem = Nothing Next with AddressOf ShortMenuItem_Click termination 

Any ideas?

I had the same symptoms in my case, I have OnAction < ComandBarPopup was controlled for code> commandbar control. There is no action on containing control.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -