La mia applicazione è molto piccola, ecco qua il codice
codice:
Possibile che ci siano tutti questi problemi? La mia è una piccola
applicazione, che crea un CommandBarButton per word, e poi alla suo click,
aggiunge allo smart panel, un UserControl, ecco qui il codice comunque.
private void ThisDocument_Startup(object sender, System.EventArgs e)
{
Office.CommandBar newCommandBar null;
Office.CommandBarButton cmdButton null;
newCommandBar this.CommandBars.Add("Command Bar Name",
Microsoft.Office.Core.MsoBarPosition.msoBarTop, false, true);
cmdButton
(Office.CommandBarButton)newCommandBar.Controls.Add(Microsoft.Office.Core.M_soControlType.msoControlButton,
System.Type.Missing, System.Type.Missing, System.Type.Missing, true);
cmdButton.Tag "ControlTag";
cmdButton.Caption "Show ActionPane";
cmdButton.Click + new
Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(cmdButton_C_lick);
cmdButton.DescriptionText "Show ActionPane";
}
public void Action()
{
UserControl1 uc new UserControl1();
this.ActionsPane.Controls.Add(uc);
}