symbol bar

  • Thread starter Thread starter Peter Ramsebner
  • Start date Start date
P

Peter Ramsebner

Hi all,

How can i create a new cumstomer Symbol/Menu bar for email messages using
vba?

Thanks,
Peter
 
Take a look at this code sample, Peter. It will add a new menu hierarchy
after the "Help" menu for any open item.

Sub AddInspectorMenu()
Dim objCB As Office.CommandBar, objMenu As Office.CommandBarPopup
Dim objMenuItem As Office.CommandBarButton
Dim objInsp As Outlook.Inspector

If Not ActiveInspector Is Nothing Then
Set objInsp = ActiveInspector
Else
Exit Sub
End If

Set objCB = objInsp.CommandBars.Item("Menu Bar")
Set objMenu = objCB.Controls.Add(MsoControlType.msoControlPopup)
objMenu.Caption = "My Menu"
Set objMenuItem = objMenu.Controls.Add(MsoControlType.msoControlButton)
objMenuItem.Caption = "My Menu Item"
End Sub
 
Back
Top