office开发有没有什么sdk包之类的?
我电脑上装VS2010 office 2003 sp3
Winform 引入word和excel 的COm,都没有问题
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;
using Word = Microsoft.Office.Interop.Word;
在另一台电脑上,也是VS2010不过是office 2003
编译的时候报错:
错误 34 命名空间“Microsoft.Office”中不存在类型或命名空间名称“Interop”。是否缺少程序集引用? C:\Documents and Settings\Administrator\My Documents\CF-Tool\codevs10\Kenal\BaseWord.cs 6 31 Kenal
还有警告
警告 17 程序集“Office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C”不是有效的程序集文件。 多件法(全件
只能重新加载com,之后还要取消:
using Excel = Microsoft.Office.Interop.Excel;
using Word = Microsoft.Office.Interop.Word;
很麻烦。
不知道有没有简单稳定些的方法?