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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top