Community
Solved by jdkriek. Go to Solution.
Here's VBA from Brian Ekins - that will loop through all the Definitions and write to .txt file.
Sub PrintCommandNames() ' Get the CommandManager object. Dim oCommandMgr As CommandManager Set oCommandMgr = ThisApplication.CommandManager ' Get the collection of control definitions. Dim oControlDefs As ControlDefinitions Set oControlDefs = oCommandMgr.ControlDefinitions ' Open the file and print out a header line. Dim oControlDef As ControlDefinition Open "C:\temp\CommandNames.txt" For Output As #1 Print #1, Tab(10); "Command Name"; Tab(75); _ "Description"; vbNewLine ' Iterate through the controls and write out the name. For Each oControlDef In oControlDefs Print #1, oControlDef.InternalName; Tab(55); _ oControlDef.DescriptionText Next ' Close the file. Close #1 End Sub
My iLogic isn't as elegantly formatted in the .txt file, but it works for me
Dim sPath As String = "C:\temp\CommandNames.txt" Dim oCommandMgr As CommandManager = ThisApplication.CommandManager Dim oControlDefs As ControlDefinitions = oCommandMgr.ControlDefinitions Dim oControlDef As ControlDefinition If System.IO.File.Exists(sPath) = True Then Dim objWriter As New System.IO.StreamWriter(sPath) For Each oControlDef In oControlDefs objWriter.WriteLine(oControlDef.InternalName & " | | " & oControlDef.DescriptionText) Next objWriter.Close() MsgBox("List Written to File") Else MsgBox("File Does Not Exist") End If
Can't find what you're looking for? Ask the community or share your knowledge.