Click here to Skip to main content
14,869,990 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to add a context menu for my contact Item in an Outlook Addin Project.. But the Menu appears at the bottom... How can I set it as first Item in Menu... ?

var contextButton = commandBar.Controls.Add(Office.MsoControlType.msoControlButton, missing, missing, 0, true) as Office.CommandBarButton;

Please Help me. This is the Image of the Menu on Mail Items.[^]

1 solution

As far as i know, using Add method adds control at the end. To change its position, use Move method.

contextButton.Move Before:=1

Note: I don't know equivalent code in C#. Sorry...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900