rnbguy

hi im using this :

try

{

// See if it already exists

this.toolbarButton = (Microsoft.Office.Core.CommandBarButton)commandBars["Standard"].Controls["Dial Contact"];

}

catch (Exception)

{

// Create it

this.toolbarButton = (Microsoft.Office.Core.CommandBarButton)commandBars["Standard"].Controls.Add(1, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value, System.Reflection.Missing.Value);

this.toolbarButton.Caption = "Dial Contact";

this.toolbarButton.Style = Microsoft.Office.Core.MsoButtonStyle.msoButtonCaption;

}

to add a button for outlook 2003 using c# , however that only adds it to mail,calender,contacts and tasks, butt i would like to add it for each contact (so when someone double clicks a contact)

any ideas



Re: Visual Studio Tools for Office outlook coding in c#

Jörg Jooss - MSFT

Moved to VSTO forum.





Re: Visual Studio Tools for Office outlook coding in c#

Sue Mosher - Outlook MVP

rnbguy, generally, you'll want to modify Outlook item toolbars through an Inspector wrapper class, as shown in the code sample at http://www.outlookcode.com/codedetail.aspx id=797