运行一下程序 为什吗老有文档不断弹出呀 无穷无极的文档自动弹出 求解呀!!!!!!
void btn_Click(Office.CommandBarButton Ctrl, ref bool CancelDefault)
{
MessageBox.Show("My button is clicked!"); }
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = true; Microsoft.Office.Core.CommandBar commandBar = wordApp.CommandBars.Add("my",Office.MsoBarPosition.msoBarTop,false ,true);
commandBar.Visible = true; Office.CommandBarButton btn = commandBar.Controls.Add(Office.MsoControlType.msoControlButton,
missing, missing, missing, true) as Office.CommandBarButton;
btn.Caption = "My Button";
btn.Tag = "MyButton";
btn.Style = Office.MsoButtonStyle.msoButtonCaption; btn.Click += new _CommandBarButtonEvents_ClickEventHandler(btn_Click); }
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
void btn_Click(Office.CommandBarButton Ctrl, ref bool CancelDefault)
{
MessageBox.Show("My button is clicked!"); }
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = true; Microsoft.Office.Core.CommandBar commandBar = wordApp.CommandBars.Add("my",Office.MsoBarPosition.msoBarTop,false ,true);
commandBar.Visible = true; Office.CommandBarButton btn = commandBar.Controls.Add(Office.MsoControlType.msoControlButton,
missing, missing, missing, true) as Office.CommandBarButton;
btn.Caption = "My Button";
btn.Tag = "MyButton";
btn.Style = Office.MsoButtonStyle.msoButtonCaption; btn.Click += new _CommandBarButtonEvents_ClickEventHandler(btn_Click); }
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货