问题描述
我意识到有大量的线程提到了这个错误,但是我找不到解释我的问题的线程。问题是这样的:
- 我有一个循环浏览一些SQL数据的应用程序,每行写一个带有单个数据行的CSV文件。然后,我使用MS Word打开mailmerge模板,附加CSV并保存我稍后在处理中使用的合并文档。
我的应用程序引用Word 2003 PIA。现在它似乎在测试中运行良好,但我现在有一个客户端使用应用程序在应用程序尝试打开模板文档时收到0x8002801D错误。他们正在使用安装了可编程性支持的Office 2007 Plus。
在这种情况下,奇怪的是它在遇到此错误之前已经成功处理了一些文档并且它并不总是失败相同的数据记录(虽然它始终是document.open失败)。
客户端非常友好地将新版本的XP和Office 2007放在另一台机器上供我们再次测试并确保原来的PC没有搞砸。办公室和XP都是服务包装。该问题仍然存在于该PC上。
我已经在我的办公室成功地重新测试了XP / 2003和Win7 / 2007上的大量数据。
我检查了融合日志查看器,还使用了代码来检查加载了哪些程序集,并且interop看起来正在发现并且绑定重定向似乎正在发生。
绝望中我重写应用程序以使用后期绑定COM并完全删除Interop。我仍然在文档打开时收到一个不可预测的错误,但现在它是System.Runtime.InteropServices.COMException(0x800A1772):Word无法触发该事件。我怀疑它是一样的,但不能确定。
我不知道的是为什么它会工作一段时间然后失败。它需要多长时间才能保持一致,有时它会立即失败,有时它会通过我的数据获得2/3。
Aaaargh!帮助!
Hi,
I realise that there are bazillions of threads with this error mentioned, but I haven't been able to find one that explains my issue. The problem is this:
- I have an application that loops through some SQL data and for each row writes a CSV file with a single data row. I then use MS Word to open a mailmerge template, attach the CSV and save the merged document which I use later in my processing.
My application references the Word 2003 PIA. Now it all seemed to work fine in testing, but I now have one client using the application who is getting the 0x8002801D error when the application tries to open the template document. They are using Office 2007 Plus with programmability support installed.
What is strange in this case is that it has successfully processed a few documents before it hits this error and it doesn't always fail on the same data record (although it's always the document.open that fails).
The client has very kindly put a new version of XP and Office 2007 on a different machine for us to test again and make sure the original PC wasn't screwed up. Both office and XP are service packed. The problem still occurs on that PC.
I have since re-tested it successfully in my office with large amounts of data on both XP/2003 and Win7/2007.
I checked fusion log viewer and also used code to check what assemblies were loaded and the interop looks find and the binding redirect appears to be taking place.
In desperation I rewrote the application to use late bound COM and removed the Interop altogether. I'm still getting an unpredictable error on the document open, but now it's System.Runtime.InteropServices.COMException (0x800A1772): Word could not fire the event. I suspect it's the same thing, but can't be sure.
What I don't get is why does it work for a while and then fail. It isn't even consistent how long it takes, sometimes it fails immediately and sometimes it gets 2/3 of the way through my data.
Aaaargh! Help!
这篇关于Dreaded 0x8002801D(TYPE_E_LIBNOTREGISTERED)再次与COM互操作....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!