Word Document Close之间存在二义性解决方案

简介:

警告1  
方法“Microsoft.Office.Interop.Word._Document.Close(ref object, ref object, ref object)”和非方法“Microsoft.Office.Interop.Word.DocumentEvents2_Event.Close”之间存在二义性。将使用方法组。  

部分程序:  
Word.Document doc = null;  
.  
.  
.  
if (doc != null)  
{  
doc.Close(ref missing, ref missing, ref missing);//警告行  
doc = null;  
}

解决方案:
Word._Document doc = null;  



本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/archive/2011/03/24/1994401.html,如需转载请自行联系原作者
相关文章
|
4月前
Appium使用UiSelector封装文本定位方法find_element_by_text
Appium使用UiSelector封装文本定位方法find_element_by_text
29 1
|
4月前
|
测试技术
Xpath层级定位方法实现find_element_by_xpath_axis
Xpath层级定位方法实现find_element_by_xpath_axis
23 0
|
数据安全/隐私保护
thymleaf th:text 和 th:utext 之间的区别
1 th:text属性 可对表达式或变量求值,并将结果显示在其被包含的 html 标签体内替换原有html文本 文本连接:用“+”符号,若是变量表达式也可以用“|”符号 e.g. 若home.welcome=Welcome to our fantastic grocery store! 用解析结果为:   Welcome to our fantastic grocery store!   2 th:utext属性 解决方案 即可。
1642 0
|
4月前
Appium文本定位方法实现find_element_by_text
Appium文本定位方法实现find_element_by_text
24 0
|
7月前
|
存储
封装读取Document temp一句代码搞定
封装读取Document temp一句代码搞定
26 0
|
7月前
|
存储
SAP ABAP 系统里长文本 Long Text 的设计和读取函数 READ_TEXT 详细讲解试读版
SAP ABAP 系统里长文本 Long Text 的设计和读取函数 READ_TEXT 详细讲解试读版
74 0
重构——29以数据类取代记录(Replace Record with Data Class)
以数据类取代记录(Replace Record with Data Class):你需要面对传统编程环境中的记录结构;为该记录创建一个“哑”数据对象
1513 0
如何将SAP Document Builder的word控件设置成只读模式
如何将SAP Document Builder的word控件设置成只读模式
86 0
如何将SAP Document Builder的word控件设置成只读模式