Question of setting the order of a custom menu in Outlook

H

Hotwheels

I have a custom menu that I added to Outlook main meu bar for my Addin, it
postioned itself right after the Help menu. Is there any way I can move this
menu before the help menu?

Can I use the Before option of the CommandBarControls.Add Method?

How do I get the number for the help menu then?

This needs to work with different languages?

Thanks
Mike
 
K

Ken Slovak - [MVP - Outlook]

The Index property of any CommandBarControl is where it's located. Get the
Index of the Help button, if it's last just use CommandBar.Controls.Count.
Otherwise you get it using FindControl() from the Explorer/Inspector
CommandBars collection or you can get a specific CommandBar and use
FindControl() from there.

What you don't have control over is what other code might be adding UI to
the same CommandBar when that code might be loaded. That can result in other
controls being placed before Help or wherever and moving your location.

Not much you can do about that unless you create your own toolbar
(CommandBar).
 

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