Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button doesn't show in outlook

Status
Not open for further replies.

sjakiePP

Programmer
Apr 6, 2004
104
NL
Hello,

I want to add a button to the command bar of outlook 2003 on the screen for sending new mail. For this I have following code:

Code:
CommandBar oStandardBar = Inspector.CommandBars["Standard"];
//CommandBar oStandardBar = Inspector.CommandBars["Default"];
//CommandBar oStandardBar = Inspector.CommandBars["E-mail"];

CommandBarButton mButtonAddInSendSMS;
					//mButtonAddInSendSMS = (CommandBarButton) oStandardBar.Controls["Send To Facilitate"];	//looking it up
mButtonAddInSendMail = (CommandBarButton) oStandardBar.Controls.Add(MsoControlType.msoControlButton, 1, "", null, true);
mButtonAddInSendMail.Caption = "Send To Facilitate";
mButtonAddInSendMail.Style = MsoButtonStyle.msoButtonCaption;
mButtonAddInSendMail.Visible = true;

Why is my button not showing on the commandbar? Before this code I have a messagebox, that pops up. The events are fired and I have the Standard bar showing.

Thanks in advance,
Sjakie

---------------------------------------------
Yes, the world is full of strange people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top