Search notes:

Office Object Model: CommandBars

The CommandBars object is a deprecated way to modify the UI (mostly/exlusively? the menu bar). In Office versions later than 2003, added menu entries appear under the Add-ins tab)

PowerShell: Iterating over commands in CommandBars

$xls = get-activeObject excel.application
 
$cmdBars = $xls.VBE.CommandBars
 
foreach ($cmdBar in $cmdBars){
      $cmdBar.name
      foreach ($control in $cmdBar.controls) {
            "  - $($control.caption) ($($control.id))";
       }
}
Later…
$cmdBarDebug = $cmdBars.item("Debug")
 
$compile = $cmdBars.FindControl(1, 578)
$compile.execute()
}

See also

.executeMso
The root object (VBE) of the VB Editor Object Model exposes a CommandBars collection.
The CommandBars collection in Excel.
Microsoft Office Object Model

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1747763947, '18.219.66.32', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/Office/Object-Model/CommandBars/index(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78