H
Hotwheels
Can I create a Office.MsoControlType.msoControlSplitButtonPopup using VS 2005
C# and VSTO SE 2005?
I cannot seem to find any thing on it. I want to have a button like the
Send and Receive button.
Is it true I cannot create a button of this type?
I put this code together but I have to use two controls a button and a popup
to get the same results.
CustomButton =
(Office.CommandBarButton)newToolbar.Controls.Add(Office.MsoControlType.msoControlButton, Type.Missing, Type.Missing, Type.Missing, true);
CustomButton.Style =
Microsoft.Office.Core.MsoButtonStyle.msoButtonIconAndCaption;
CustomButton.Caption = "Send to EquityWorks";
CustomButton.Tag = "Send Emails to EquityWorks";
CustomButton.Enabled = true;
CustomButton.Picture = getImage();
CustomButton.Mask = getMask();
CustomButton.Click += new
Office._CommandBarButtonEvents_ClickEventHandler(CustomButtonClick);
Office.CommandBarPopup barPopup =
newToolbar.Controls.Add(Office.MsoControlType.msoControlPopup, missing,
missing, missing, true) as Office.CommandBarPopup;
barPopup.Caption = " ";
Office.CommandBarButton btn =
barPopup.Controls.Add(Office.MsoControlType.msoControlButton, missing,
missing, missing, true) as Office.CommandBarButton;
btn.Caption = "hot";
btn.Click += new
Office._CommandBarButtonEvents_ClickEventHandler(btnClick);
Office.CommandBarButton btn2 =
barPopup.Controls.Add(Office.MsoControlType.msoControlButton, missing,
missing, missing, true) as Office.CommandBarButton;
btn2.Caption = "warm";
btn2.Click += new
Office._CommandBarButtonEvents_ClickEventHandler(btn2Click);
Thanks
Mike
C# and VSTO SE 2005?
I cannot seem to find any thing on it. I want to have a button like the
Send and Receive button.
Is it true I cannot create a button of this type?
I put this code together but I have to use two controls a button and a popup
to get the same results.
CustomButton =
(Office.CommandBarButton)newToolbar.Controls.Add(Office.MsoControlType.msoControlButton, Type.Missing, Type.Missing, Type.Missing, true);
CustomButton.Style =
Microsoft.Office.Core.MsoButtonStyle.msoButtonIconAndCaption;
CustomButton.Caption = "Send to EquityWorks";
CustomButton.Tag = "Send Emails to EquityWorks";
CustomButton.Enabled = true;
CustomButton.Picture = getImage();
CustomButton.Mask = getMask();
CustomButton.Click += new
Office._CommandBarButtonEvents_ClickEventHandler(CustomButtonClick);
Office.CommandBarPopup barPopup =
newToolbar.Controls.Add(Office.MsoControlType.msoControlPopup, missing,
missing, missing, true) as Office.CommandBarPopup;
barPopup.Caption = " ";
Office.CommandBarButton btn =
barPopup.Controls.Add(Office.MsoControlType.msoControlButton, missing,
missing, missing, true) as Office.CommandBarButton;
btn.Caption = "hot";
btn.Click += new
Office._CommandBarButtonEvents_ClickEventHandler(btnClick);
Office.CommandBarButton btn2 =
barPopup.Controls.Add(Office.MsoControlType.msoControlButton, missing,
missing, missing, true) as Office.CommandBarButton;
btn2.Caption = "warm";
btn2.Click += new
Office._CommandBarButtonEvents_ClickEventHandler(btn2Click);
Thanks
Mike