outlook menu is not deleted

A

ammar

Hi All,

I developed an outlook add-in, and every thing seemd to be fine untill
i tried to unregister the add in!
i added a new menu item in the inspector window through the
NewInspector event,

in the new inspevtor event i added the following lines

On Error Resume Next
Inspector.CommandBars("Menu Bar").Controls("My Menu").Delete
Set objRootMenu = Inspector.CommandBars("Menu bar")
Set mnuRoot = objRootMenu.Controls.Add(Type:=msoControlPopup,before:=objRootMenu.Controls.count)
With mnuRoot
.Caption = "&My Menu"
End With
the problem is that when i deleted the addin keys from the registry
the menu is still there, which i feel is logic cos it is not deleted
by the addin, i tried to use the inspector close event to delete the
menu, but also it doesnot work!!

any ideas???
thanx in advance
 
D

Dmitry Streblechenko

When calling
objRootMenu.Controls.Add()
specify Temporary:=True, this way the button won't be persisted.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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

Top