Try the macro from this address. http://weblogs.asp.net/jan/archive/2003/04/29/6168.aspx
It does exactly what you need and you can fully customize the generated code. After you create this macro, you can create a button in standatd toolbar which runs the macro.
Signature
Peter Macej Helixoft - http://www.vbdocman.com VBdocman - Automatic generator of technical documentation for VB, VB .NET and ASP .NET code
Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...