Adding Custom menu items in the File Menu

M

mookashi

hi,

is it possible to add my own custom menu items in the File Menu.
Under the File/New menu where we see different types of mailitems,
can i add my own type of menu items

thank
 
E

Eric Legault [MVP - Outlook]

The code is actually pretty simple to add a custom menu item:

Dim objCBs As CommandBars, objCBCs As CommandBarControls
Dim objCBP As CommandBarPopup, objCBB As CommandBarButton
Dim intX As Integer

Set objCBs = Application.ActiveExplorer.CommandBars
Set objCBP = objCBs.FindControl(, 30037) 'GET THE New MENU
Set objCBCs = objCBP.Controls
Set objCBB = objCBCs.Add
objCBB.Caption = "My button"

For more information on programming with Outlook Command Bars, see this
great article at MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnofftalk/html/office05022002.asp
 
Top