求教专家,在窗口中设置一按钮的click代码为:
Dim tm As String = ProjectPath & "Attachments\xx.doc"Dim fl As String = ProjectPath & "Reports\xx.doc"
Dim wrt As New WordReport(Tables("yy"),tm,fl)
wrt.Build()
wrt.Show()
在部分电脑上运行发布项目后,在单击该按钮后出现报错:
.NET Framework 版本:2.0.50727.3655
Foxtable 版本:2014.4.21.1
错误所在事件:窗口,事故业务,Button01,Click
详细错误信息:
Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: 加载类型库/DLL 时出错。 (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
请问,这种情况是什么原因?如何解决?