Creating a Macros Toolbar
Creating a toolbar for macros in Visual Studio .NET is exactly like creating a macros toolbar in an Office application.The first step is to right-click on the Visual Studio .NET toolbar area to get the list of available toolbars. Then select Customize, as Figure 16.12 demonstrates.
Figure 16.12. The Toolbars menu.

After you click Customize, the Customize dialog pops up. Click the New button, and type Utilities in the input box, as Figure 16.13 shows.
Figure 16.13. Adding the Utilities toolbar.

After you add the new toolbar, you'll see an empty toolbar next to the dialog box. Click the Commands tab on the Customize dialog. On the left Categories pane, scroll down until you see Macros. Select Macros, and you'll see the Macro projects listed in the Commands list box.Scroll down in the Commands list box until you see the Utilities.VSMacros project that all your macros are in. Figure 16.14 is what you should see on your screen.
Figure 16.14. Finding the Utilities.VSMacros commands.

When you see the commands, drag the items to the new toolbar as shown in Figure 16.15.
Figure 16.15. Adding commands to the new Utilities toolbar.

Because the descriptions are too long to be logical, you can right-click each item in the toolbar, and change its name to something less wordy. Notice that you can also add an icon to your toolbar item using the contextual menu.Figure 16.16 shows my completed toolbar with an icon on the GetDocumentInfo2 macro, as well as the automatic tooltip that's provided by the IDE.
Figure 16.16. The completed Macro toolbar in action.

So, your work has come full circle: You created a macro using the recorder, rewrote it using the objects in the DTE class, and finally you created a toolbar to access your macros faster than going to the Macro Explorer.