Click here to Skip to main content
15,879,474 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... ?

C#
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.

http://i.stack.imgur.com/Hf5zA.png[^]
Posted

1 solution

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

VBA:
VB
contextButton.Move Before:=1


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

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