addnamedcommand problem
-
Thursday, April 26, 2012 7:33 PM
This is a VB 10 addin
I can create two popup commands for the "Code Window".
Everything works fine, but when I add the third command
it is returning IsAvailable = false
Dim ocmd As Command
ocmd = m_dte.Commands.AddNamedCommand(AddInInstance:=m_addIn, Name:=m_NAME_AddFunctionDescription_WithTask, ButtonText:="Create Method Header", Tooltip:="Create Method Header", MSOButton:=True, Bitmap:=59)
ocmd = m_dte.Commands.AddNamedCommand(AddInInstance:=m_addIn, Name:=m_NAME_CreateDefaultRegions, ButtonText:="CreateDefaultRegions", Tooltip:="CreateDefaultRegions", MSOButton:=True, Bitmap:=59)
ocmd = m_dte.Commands.AddNamedCommand(AddInInstance:=m_addIn, Name:=m_NAME_InsertUifUtilities2008NameSpaces, ButtonText:="Insert", Tooltip:="Insert", MSOButton:=True, Bitmap:=59)If I change the order, change their names, makes no difference.
I can only get the first two to show up in "Code Window"
I tried setting the vsCommandDisabledFlagsValue to 3,16 does not work
Thanks
All Replies
-
Friday, April 27, 2012 7:57 AMModerator
Hi Greg
If I'm following correctly, this is an Add-in for the VBA Editor window? Or is it an Add-in for VB.NET?
Either way, the VSTO forum isn't the right place for the question as the VSTO technology doesn't create add-ins for any code editors. I'd like to move it to a more appropriate forum for you, but I first need to know exactly what it is you're doing...
Cindy Meister, VSTO/Word MVP
-
Friday, April 27, 2012 3:47 PMModerator
Hi Greg_overspeedtrip,
Welcome to MSDN Forum.
I'll be assisting you over this issue. It will be nice if you can provide some more detailed information. I'll do some research over this issue on the next work day.
Have a nice weekend.
Best Regards,
Quist
Quist Zhang [MSFT]
MSDN Community Support | Feedback to us
- Edited by Quist ZhangMicrosoft Contingent Staff, Moderator Friday, April 27, 2012 3:48 PM
-
Tuesday, May 01, 2012 3:02 AMModerator
Hi Greg_overspeedtrip,
How is everything going?
I’m now working on this issue. And I’m not quite sure about what the Command and m_dte are. It will be nice if you can show some more detailed information such as the references you’ve add or more detailed code.
I’m looking forward to your reply.
Best Regards,
QuistQuist Zhang [MSFT]
MSDN Community Support | Feedback to us

