“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型
“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Word._Application”。此操作失败的原因是对 IID 为“{00020970-0000-0000-C000-000000000046}”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 加载类型库/DLL 时出错。 (异常来自 HRESULT:0x80029C4A (TYPE_E_CANTLOADLIBRARY))。
相关推荐
Microsoft.Office.Interop.Word.dll
Microsoft.Office.Interop.Word.dll 事例如 object Nothing = System.Reflection.Missing.Value; object srcFileName = @"D:\aa.html"; object dstFileName = @"d:\li.doc"; object objt = true; Word.Application wordApp = new Word.ApplicationClass(); Word.Document wordDoc = null; object format = Word.WdSaveFormat.wdFormatDocument; try { wordDoc = wordApp.Documents.Open(ref srcFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); //图片 Word.Shape oShape = wordDoc.Shapes.AddPicture("D:\\DL_01.gif", ref Nothing, ref objt, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); oShape.WrapFormat.Type = Word.WdWrapType.wdWrapSquare; //将htm文件save as成doc文件 wordDoc.SaveAs(ref dstFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); } finally { wordDoc.Close(ref Nothing, ref Nothing, ref Nothing); wordApp.Quit(ref Nothing, ref Nothing, ref Nothing); } }
c# 读取WORD的内容并显示在页面上
这是用C#来读取WORD中的内容的可用程序
Microsoft.Office.Interop.Word
Microsoft.Office.Interop.Word 的各个版本 14 12 11
C#将Word转换成PDF方法汇总(基于Office和WPS)
主要汇总了C#将Word转换成PDF方法,基于Office和WPS的两种解决方案,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
C#操作word文档 C#实现Word中表格信息读取
C#操作word文档 C#实现Word中表格信息读取


其他技术讨论专区

