Question of setting the order of a custom menu in Outlook

  • Thread starter Thread starter Hotwheels
  • Start date Start date
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
 
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).
 
Back
Top