Question of setting the order of a custom menu in Outlook

Status
Not open for further replies.
S

SG90d2hlZWxz

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).

"Hotwheels" <Hotwheels> wrote in message

news:3F96A970-D927-4D74-B52D-0C9A2F3D2C2C@microsoft.com...
> 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
 
Status
Not open for further replies.
Top