I wanted to create an addin button that can close all documents just
like when you click "Window | Close All Documents" from vs.net 2005 ide
menu but couldn't figure out how to do this. I'm able to create the
button and find out the command name (Window.CloseAllDocuments),
GUID{5EFC7975-14BC-11CF-9B2B-00AA00573819} and ID(627) etc. using
Microsoft's CmdBrowserVB sample project. There must be an easy way to
do this.
Thanks for help.
Peter Macej - 23 May 2006 08:08 GMT
You can invoke any VS command using DTE.ExecuteCommand method. In your
case you can use DTE.ExecuteCommand("Window.CloseAllDocuments").

Signature
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
.NET and ASP .NET code
Rob - 23 May 2006 13:00 GMT
Very nice tip. My project uses C# addin template so the code is
"_applicationObject.ExecuteCommand("Window.CloseAllDocuments","");