一个关于word的问题
我的程序里面可以自动产生Word文档
在我自己的机子上运行很好的,但是换到其他机子上的时候,其他功能都好的,只有产生Word文档时候会出现错误
错误显示的消息如下:
System.InvalidCastException:QueryInterface for interface Word._Application failed.
at Word.ApplicationClass.set_Visible(Boolean prop)
at SE.DowMethod.DowAutogenerationReport.autogeneration(String astrMethodID, DataSet mydataset)
这如何解决啊?
另外在程序的相同目录下包含以下文件:
Interop.Excel.dll
Interop.Microsoft.Office.Core.dll
Interop.Office.dll
Interop.VBIDE.dll
Interop.Word.dll