What macro is a menu item pointing to?Question asked on August 8, 2005 11:22 PM :: Permalink :: Comments (0)Word is a powerful word processor that simplifies a lot of steps by using wizards and point-and-click type commands. Programmers and power-users can add even more powerful features to Word by writing special functions in Visual Basic for Applications (VBA) that performs functions that may be specialized to a particular need. When done in a company setting, these features may be added to Word's menu bar to make it easier for users to find these commands. While this is a great feature, it can cause a few problems if the original programmer is no longer available to maintain the code and he didn't leave any comments as to which menu items called which functions. This is where Word's point-and-click interface is deficient. However, you can use VBA to make up for that deficiency. The macro listed below will create a list in the currently active document that lists every menu bar and tool bar, Command Bars in Microsoft speak, available to Word. It will then list every item on those Command Bars and which macro, if any, the item points to.
Public Sub CommandBarNames() ' Written by Westley Annis ' http://www.AskWestley.com Dim cbBar As CommandBar, ctControl As CommandBarControl For Each cbBar In Application.CommandBars CategoriesMicrosoft Office
|
|
Leave a comment