You may wish to make sure that you have the command name correct in the QueryStatus/Exec method. While you may have called AddNamedCommand with something like "Foo" as the command name is really the full string "Foo." + ProgID. So if the ProgID of the Add-in is MyAddin1.Connect, the full command name that you want to look for in QueryStatus/Exec is "Foo.MyAddin1.Connect".
Craig VS .NET Object Model Team -----Original Message----- From: Alejandro Mezcua [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:41 AM To: [EMAIL PROTECTED] Subject: [DOTNET] Add-In Command Not Executing Hi, i'm going kind of crazy over this, so maybe someone can help me out. I'm developing an addin and want to have custom commands that i register using AddNamedCommand. I can register the commands on the OnConnection event and remove them on the OnDisconnection event. The AddIn loads fine, creates an output window and writes the list of registered commands to it, showing the new commands created. I put a command in a tool bar but when i click on it, i't says that 'The Add-in supporting this command could not be loaded. ...' And asks to remove the command. If i answer no, the command stays fine and when my addin unloads it removes the commands ok on the OnDisconnection event. Of course the Exec event never gets fired. What is going on here? I thougth i was not passing the add in instance reference to the AddNamedCommand function correctly, but i've checked and i think it's fine. Any help would be appeciated. Alejandro Mezcua You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.