List All Commands


Excel

This code shows you the list in Excel

Public Sub BET_ListControls 
Dim control As CommandBarControls
Dim icount1 As Integer
Dim icount2 As Integer
Dim icount3 As Integer

For icount1 = 1 To CommandBars.count
   With CommandBars.Item(icount1)
   For icount2 = 1 To .Controls.count
   On Error Resume Next
      For icount3 = 1 To .Controls(icount2).Controls.count
         ActiveCell.Value = .Name
         ActiveCell.Offset(0, 1).Range("A1").Select
         ActiveCell.Value = .Controls(icount2).Caption
         ActiveCell.Offset(0, 1).Range("A1").Select

         ActiveCell.Value = .Controls(icount2).ID
         ActiveCell.Offset(0, 1).Range("A1").Select
         On Error Resume Next
         ActiveCell.Value = .Controls(icount2).Controls(icount3).Caption
         ActiveCell.Offset(0, 1).Range("A1").Select
         ActiveCell.Value = .Controls(icount2).Controls(icount3).ID

         ActiveCell.Offset(1, -4).Range("A1").Select
      Next icount3
   Next icount2
   End With
Next icount1
End Sub

Word

Public Sub BET_ListCommands() 
   Dim control As CommandBarControls
   Dim icount1 As Integer
   Dim icount2 As Integer
   Dim icount3 As Integer

   For icount1 = 1 To CommandBars.Count
      With CommandBars.Item(icount1)
      For icount2 = 1 To .Controls.Count
      On Error Resume Next
         For icount3 = 1 To .Controls(icount2).Controls.Count
            If InStr(.Controls(icount2).Caption, "&File") > 0 Then
               Debug.Print .Name
               Debug.Print .Controls(icount2).Caption
               Debug.Print .Controls(icount2).ID
   
               On Error Resume Next
               Debug.Print .Controls(icount2).Controls(icount3).Caption
               Debug.Print .Controls(icount2).Controls(icount3).ID
               
               Debug.Print "----"
               
            End If
   
         Next icount3
      Next icount2
      End With
   Next icount1
End Sub

PowerPoint

Public Sub BET_ListCommands() 
Dim control As CommandBarControls
Dim icount1 As Integer
Dim icount2 As Integer

   With CommandBars("Shapes")
      Debug.Print .Name

      For icount1 = 1 To .Controls.Count
      On Error Resume Next
         For icount2 = 1 To .Controls(icount1).Controls.Count

            Debug.Print .Controls(icount1).Caption
            Debug.Print .Controls(icount1).Id
   
            On Error Resume Next
            Debug.Print .Controls(icount1).Controls(icount2).Caption
            Debug.Print .Controls(icount1).Controls(icount2).Id
      
         Next icount2
      Next icount1
   End With
End Sub

Application.ListCommands

Creates a new document and then inserts a table of Word commands along with their associated shortcut keys and menu assignments.

Application.ListCommands ListCommands:=False 

This includes all commands not just those with customised assignments.

Application.ListCommands ListCommands:=True 
Command NameModifiersKeyMenu
About  Help
Accept All Changes in Doc  Accept
Accept All Changes Shown  Accept
All CapsCtrl+Shift+A 
AnnotationAlt+Ctrl+MInsert
App MaximizeAlt+F10 
App RestoreAlt+F5 
Apply Heading1Alt+Ctrl+1 
Apply Heading2Alt+Ctrl+2 
Apply Heading3Alt+Ctrl+3 
Apply List BulletCtrl+Shift+L 
Arrange All  Window
Auto Correct  Tools
Auto FormatAlt+Ctrl+K 
Auto Format Begin  Format
Auto Summarize Begin  Tools
Auto Text F3 
Auto TextAlt+Ctrl+V 
Background Fill Effect  Format Background
Background More Colors  Format Background
Background Watermark  Format Background
BoldCtrl+B 
BoldCtrl+Shift+B 
BookmarkCtrl+Shift+F5Insert
Bookshelf Lookup Reference  Tools
Break  Insert
Browse NextCtrl+Page Down 
Browse PrevCtrl+Page Up 
Browse SelAlt+Ctrl+Home 
Busu  Language
Cancel Esc 
Center ParaCtrl+E 
Change Case  Format
Change CaseShift+F3 
Changes  View
Char Left Left 
Char Left ExtendShift+Left 
Char Right Right 
Char Right ExtendShift+Right 
Checkin  File
Checkout  File
Clear DelClear
Clear Formatting  Clear
Close or ExitAlt+F4 
Close PaneAlt+Shift+C 
Column BreakCtrl+Shift+Return 
Column SelectCtrl+Shift+F8 
CopyCtrl+C 
CopyCtrl+Insert 
Copy FormatCtrl+Shift+C 
Copy TextShift+F2 
Create Auto TextAlt+F3 
Cross Reference  Reference Menu
Customize  Tools
Customize Add Menu ShortcutAlt+Ctrl+= 
Customize Keyboard ShortcutAlt+Ctrl+Num + 
Customize Remove Menu ShortcutAlt+Ctrl+- 
CutCtrl+X 
CutShift+Del 
Date FieldAlt+Shift+D 
Date Time  Insert
Delete All Comments in Doc  Reject
Delete All Comments Shown  Reject
Delete Back WordCtrl+Backspace 
Delete Table  Toolbar 32780
Delete WordCtrl+Del 
Distribute ParaCtrl+Shift+J 
Do Field ClickAlt+Shift+F9 
Doc CloseCtrl+W 
Doc CloseCtrl+F4 
Doc MaximizeCtrl+F10 
Doc MoveCtrl+F7 
Doc RestoreCtrl+F5 
Doc SizeCtrl+F8 
Doc SplitAlt+Ctrl+SWindow
Double UnderlineCtrl+Shift+D 
Draw Snap to Grid  Draw
End of ColumnAlt+Page Down 
End of ColumnAlt+Shift+Page Down 
End of Doc ExtendCtrl+Shift+End 
End of DocumentCtrl+End 
End of Line End 
End of Line ExtendShift+End 
End of RowAlt+End 
End of RowAlt+Shift+End 
End of WindowAlt+Ctrl+Page Down 
End of Window ExtendAlt+Ctrl+Shift+Page Down 
Endnote NowAlt+Ctrl+D 
Envelope Wizard  Letters and Mailings Menu
EServices  Tools
Exit  File
Extend Selection F8 
Field  Insert
Field CharsCtrl+F9 
Field CodesAlt+F9 
FindCtrl+F 
Fix Broken Text  Tools
Fix Me  Help
FontCtrl+D 
FontCtrl+Shift+F 
Font Size SelectCtrl+Shift+P 
Footnote NowAlt+Ctrl+F 
Footnotes  View
Formatting Properties  Format
Formula  Table
Frameset Wizard  Frames Menu
Go BackShift+F5 
Go BackAlt+Ctrl+Z 
Go ToCtrl+GEdit
Go To F5Edit
Grow FontCtrl+Shift+. 
Grow Font One PointCtrl+] 
Hanging IndentCtrl+T 
Hanja Dictionary  Language
Header  View
Header Footer LinkAlt+Shift+R 
Headings  Table
Help F1 
HHC  Language
HiddenCtrl+Shift+H 
HTMLSource  View
HyperlinkCtrl+K 
Hyphenation  Language
IndentCtrl+M 
Index and Tables  Reference Menu
Insert Column  Toolbar 32782
Insert Column Right  Toolbar 32782
Insert Row Above  Toolbar 32782
Insert Row Below  Toolbar 32782
ItalicCtrl+I 
ItalicCtrl+Shift+I 
Justify ParaCtrl+J 
Language  Language
Left ParaCtrl+L 
Letter Properties  Letters and Mailings Menu
Letters Wizard JToolbar  Letters and Mailings Menu
License Verification  Help
Line Down Down 
Line Down ExtendShift+Down 
Line Up Up 
Line Up ExtendShift+Up 
Links  Edit
List Num FieldAlt+Ctrl+L 
Lock FieldsCtrl+3 
Lock FieldsCtrl+F11 
MacroAlt+F8 
Mail Merge CheckAlt+Shift+K 
Mail Merge Edit Data SourceAlt+Shift+E 
Mail Merge to DocAlt+Shift+N 
Mail Merge to PrinterAlt+Shift+M 
Mail Merge Toolbar  Letters and Mailings Menu
Mail Merge Wizard  Letters and Mailings Menu
Mark CitationAlt+Shift+I 
Mark Index EntryAlt+Shift+X 
Mark Table of Contents EntryAlt+Shift+O 
Menu Mode F10 
Menu Show Reviewers  Show Markup
Merge FieldAlt+Shift+F 
Merge Revisions  Tools
Microsoft Script EditorAlt+Shift+F11 
Microsoft System InfoAlt+Ctrl+F1 
Move Text F2 
NewCtrl+NFile
New Window  Window
Next Cell Tab 
Next Field F11 
Next FieldAlt+F1 
Next MisspellingAlt+F7 
Next ObjectAlt+Down 
Next WindowCtrl+F6 
Next WindowAlt+F6 
NormalAlt+Ctrl+NView
Normal StyleCtrl+Shift+N 
Normal StyleAlt+Shift+Clear (Num 5) 
Number  Insert
Object  Insert
Office Clipboard  Edit
Office On The Web  Help
Online Meeting  Online Collaboration
OpenCtrl+O 
OpenCtrl+F12 
OpenAlt+Ctrl+F2 
Open or Close Up ParaCtrl+0 
Options  Tools
Other Pane F6 
Other PaneShift+F6 
OutlineAlt+Ctrl+O 
Outline CollapseAlt+Shift+- 
Outline CollapseAlt+Shift+Num - 
Outline DemoteAlt+Shift+Right 
Outline ExpandAlt+Shift+= 
Outline ExpandAlt+Shift+Num + 
Outline Master  View
Outline Move DownAlt+Shift+Down 
Outline Move UpAlt+Shift+Up 
Outline PromoteAlt+Shift+Left 
Outline Show First LineAlt+Shift+L 
Overtype Insert 
PageAlt+Ctrl+PView
Page BreakCtrl+Return 
Page Down Page Down 
Page Down ExtendShift+Page Down 
Page FieldAlt+Shift+P 
Page Numbers  Insert
Page Up Page Up 
Page Up ExtendShift+Page Up 
Para DownCtrl+Down 
Para Down ExtendCtrl+Shift+Down 
Para UpCtrl+Up 
Para Up ExtendCtrl+Shift+Up 
PasteCtrl+V 
PasteShift+Insert 
Paste As Hyperlink  Edit
Paste FormatCtrl+Shift+V 
Paste Special  Edit
Post  Send To
Postcard Wizard  Letters and Mailings Menu
Present It  Send To
Prev CellShift+Tab 
Prev FieldShift+F11 
Prev FieldAlt+Shift+F1 
Prev ObjectAlt+Up 
Prev WindowCtrl+Shift+F6 
Prev WindowAlt+Shift+F6 
PrintCtrl+P 
PrintCtrl+Shift+F12 
Print PreviewCtrl+F2 
Print PreviewAlt+Ctrl+I 
Proofing F7 
Properties  File
Protect Unprotect Document  Tools
Record Macro Toggle  Macro
RedoAlt+Shift+Backspace 
Redo or RepeatCtrl+YEdit
Redo or Repeat F4Edit
Redo or RepeatAlt+ReturnEdit
Reject All Changes in Doc  Reject
Reject All Changes Shown  Reject
Repeat FindShift+F4 
Repeat FindAlt+Ctrl+Y 
ReplaceCtrl+HEdit
Reset CharCtrl+Space 
Reset CharCtrl+Shift+Z 
Reset ParaCtrl+Q 
Revision Marks ToggleCtrl+Shift+E 
Right ParaCtrl+R 
Routing Slip  Send To
SaveCtrl+S 
SaveShift+F12 
SaveAlt+Shift+F2 
Save As F12File
Save As Web Page  File
Schedule Meeting  Online Collaboration
Select AllCtrl+AEdit
Select AllCtrl+Clear (Num 5)Edit
Select AllCtrl+Num 5Edit
Select Cell  Toolbar 32778
Select Column  Toolbar 32778
Select Row  Toolbar 32778
Select TableAlt+Clear (Num 5)Toolbar 32778
Send For Review  Send To
Send to Fax  Send To
Send to Online Meeting Participants  Send To
Show AllCtrl+Shift+8 
Show All HeadingsAlt+Shift+A 
Show All HeadingsAlt+Shift+A 
Show Comments  Show Markup
Show Formatting  Show Markup
Show Heading1Alt+Shift+1 
Show Heading2Alt+Shift+2 
Show Heading3Alt+Shift+3 
Show Heading4Alt+Shift+4 
Show Heading5Alt+Shift+5 
Show Heading6Alt+Shift+6 
Show Heading7Alt+Shift+7 
Show Heading8Alt+Shift+8 
Show Heading9Alt+Shift+9 
Show Hide  Help
Show Insertions and Deletions  Show Markup
Shrink FontCtrl+Shift+, 
Shrink Font One PointCtrl+[ 
Shrink SelectionShift+F8 
Sign Out of Passport  File
Small CapsCtrl+Shift+K 
Sort  Table
Sound  Comments
Space Para1Ctrl+1 
Space Para15Ctrl+5 
Space Para2Ctrl+2 
Speech  Tools
SpikeCtrl+Shift+F3 
SpikeCtrl+F3 
Split  Table
Start of ColumnAlt+Page Up 
Start of ColumnAlt+Shift+Page Up 
Start of Doc ExtendCtrl+Shift+Home 
Start of DocumentCtrl+Home 
Start of Line Home 
Start of Line ExtendShift+Home 
Start of RowAlt+Home 
Start of RowAlt+Shift+Home 
Start of WindowAlt+Ctrl+Page Up 
Start of Window ExtendAlt+Ctrl+Shift+Page Up 
StyleCtrl+Shift+S 
Style SeparatorAlt+Ctrl+Return 
SubscriptCtrl+= 
SuperscriptCtrl+Shift+= 
Symbol  Insert
Symbol FontCtrl+Shift+Q 
Tabs  Format
Templates  Tools
Theme  Format
ThesaurusShift+F7Language
Time FieldAlt+Shift+T 
Toggle Character CodeAlt+X 
Toggle Field DisplayShift+F9 
Toggle Master SubdocsCtrl+\ 
ToolShift+F1 
Toolbars  View
Translate PaneAlt+Shift+F7Language
Un HangCtrl+Shift+T 
Un IndentCtrl+Shift+M 
UnderlineCtrl+U 
UnderlineCtrl+Shift+U 
UndoCtrl+Z 
UndoAlt+Backspace 
Unlink FieldsCtrl+6 
Unlink FieldsCtrl+Shift+F9 
Unlock FieldsCtrl+4 
Unlock FieldsCtrl+Shift+F11 
Update Auto FormatAlt+Ctrl+U 
Update Fields F9 
Update FieldsAlt+Shift+U 
Update SourceCtrl+Shift+F7 
VBCodeAlt+F11 
Versions  File
Web  View
Web Component  Insert
Web Go BackAlt+Left 
Web Go ForwardAlt+Right 
Web Page Preview  File
Wizard  Table
Word Count  Tools
Word Count ListCtrl+Shift+G 
Word Count RecountCtrl+Shift+R 
Word LeftCtrl+Left 
Word Left ExtendCtrl+Shift+Left 
Word Perfect Help  Help
Word RightCtrl+Right 
Word Right ExtendCtrl+Shift+Right 
Word UnderlineCtrl+Shift+W 

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext