问题基本解决了,谁来接分呢?
首先,创建一个函数:
private void OnClose(Word.Document doc, ref bool chancel)
{
//关闭后的处理代码
if(doc.name=="a;dfs;fsf")
chancel=true;
}
然后进行委托:
myApp.DocumentBeforeClose+= new Word.ApplicationEvents2_DocumentBeforeCloseEventHandler(OnClose);
首先,创建一个函数:
private void OnClose(Word.Document doc, ref bool chancel)
{
//关闭后的处理代码
if(doc.name=="a;dfs;fsf")
chancel=true;
}
然后进行委托:
myApp.DocumentBeforeClose+= new Word.ApplicationEvents2_DocumentBeforeCloseEventHandler(OnClose);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货