问题描述
public:voidQuit(){Object^missing=System::Reflection::Missing::Value;Object^%tmissing=missing;oWordApplic.Application->Quit(tmissing,tmissing,tmissing);}报二义性的错,errorC2385:ambiguousaccessof'Quit'couldbethe'Quit'inbase'Microsoft::Office::Interop::Word::_Application'orcouldbethe'Quit'inbase'Microsoft::Office::Interop::Word::ApplicationEvents4_Event'同时还报'Quit':identifiernotfound
解决方案
解决方案二:
路过帮顶=============11月6日,论坛升级公告,积分已经做了调整!http://topic.csdn.net/u/20081107/11/b27dc75f-14b1-4594-9de3-5b18d9e36a11.html此次调整增加了两个新的可用分获取渠道:1:帖子被推荐(加精)后,帖主可以获得88分的可用分奖励;2:帖子结帖后会返还帖主50%的悬赏分,无满意结帖不返还分数;3:接下来会不断增加新的可用分获取途径,比如参与活动赠送等,请大家多关注;
解决方案三:
publicmsWord(MainFormfm){mainForm=fm;app=newMicrosoft.Office.Interop.Word.ApplicationClass();}~msWord(){try{if(app!=null&&app.Visible!=true){//现在像好用户一样,使用Quit方法进行清理objectsaveChanges=false;objectoriginalFormat=Missing.Value;objectrouteDocument=Missing.Value;app.Quit(refsaveChanges,reforiginalFormat,refrouteDocument);}}catch{}}