I would like Visual Studio to format my source code every time I save. I can do this in Eclipse. Can it be done in Visual Studio 2005?
                +3 
                A: 
                
                
              It is possible with the Powercommands plugin for VS.NET, but, I fear that this plugin is only available for VS.NET 2008.
                  Frederik Gheysels
                   2009-03-13 13:40:56
                
              It looks like it does not work with C++ code.
                  Sorin Sbarnea
                   2009-10-23 08:01:28
                
                +3 
                A: 
                
                
              You can do it with a macro.
Here is the code for the macro, which can be mapped to a button in a toolbar and/or a keyboard shortcut
Public Module SaveAndFormat
    Sub SaveAndFormat()
        DTE.ExecuteCommand("Edit.FormatDocument")
        DTE.ActiveDocument.Save()
    End Sub
End Module
                  phsr
                   2009-03-13 13:49:59