对象'_application'的方法'comaddins'在查找已注册的COMAddins时失败 [英] method 'comaddins' of object '_application' failed while looking for the registered COMAddins

查看:424
本文介绍了对象'_application'的方法'comaddins'在查找已注册的COMAddins时失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有这个简单的部分我们在注册Addin并试图通过循环Addin列表来找到Addin。这在所有机器上都不能始终如一地重现,我们开始在客户端机器上看到这一点。我们也没有看到代码有什么问题。请帮忙。



当代码遇到for循环时,我们会收到此错误。运行时错误-2147310770(8002801d)。对象'_application'的方法'comaddins'失败。



We have this simple piece Where in we are registering an Addin and trying to find the Addin by looping through the list of Addins. This is not consistently reproducible on all the machines and we started seeing this on a client machine. We dont see anything wrong with the code either. Please help.

When the code hits the for loop we get this error. Runtime Error -2147310770(8002801d). method 'comaddins' of object '_application' failed.

For Each oAddin In oWordApp.COMAddIns

Sub Main()

Call RegisterAddin

Dim oWordApp As New Word.Application

Dim oAddin As Office.COMAddIn

**For Each oAddin In oWordApp.COMAddIns**
    If oAddin.DESCRIPTION = "TestingCom Addin" Then
        oAddin.Connect = True
    End If
Next

推荐答案

我能够使用以下链接解决此问题。看起来Office的上一个/最新版本未正确卸载并导致Office 2007出现问题。



http://kb.palisade.com/index.php?pg=kb.page&id=528 [ ^ ]
I was able to fix this using the below link. Looks like the previous/latest version of Office was not uninstalled properly and was causing problems with Office 2007.

http://kb.palisade.com/index.php?pg=kb.page&id=528[^]


这篇关于对象'_application'的方法'comaddins'在查找已注册的COMAddins时失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆