本文介绍了在outlook addin中读取收件人属性时操作失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们开发了outlook addin,我们将它部署在outlook 2010 sp2上,并且有最新的补丁。

we have developed outlook addin and we deployed it on outlook 2010 sp2 and is having latest patch.

现在在几台安装了插件的机器上,同时试图获得outlook预约项目的rceipients属性。我收到此错误

Now on few machines where addin is installed , whilst trying to get rceipients property of outlook appointment item. i get this error

无法将"System .__ ComObject"类型的COM对象强制转换为接口类型"Microsoft.Office.Interop.Outlook._AppointmentItem"。此操作失败,因为由于以下错误,对IID为"{00063033-0000-0000-C000-000000000046}"
的接口的COM组件的QueryInterface调用失败:库未注册。 (HRESULT的例外情况:0x8002801D(TYPE_E_LIBNOTREGISTERED))

dim AppItemas outlook.appintmentitem

dim AppItemas outlook.appintmentitem

Dim Recipients As Outlook.Recipients = Nothing

Dim Recipients As Outlook.Recipients = Nothing

收件人= AppItem.Recipients(假设apppitem已被初始化) - 受影响的计算机在此处收到错误

Recipients = AppItem.Recipients (assume apppitem has been initalised) --effected machines are  getting error here

当我尝试访问一个MAPI文件夹时也会出现类似的错误,该文件夹实际上是一个保存在.net集合对象中的celndaritem

I also get similar error when try to access the a MAPIfolder which is actually a celndaritem  saved in .net collection object

Dim CalendarFolderItems As Outlook.Items = Nothing

Dim CalendarFolderItems As Outlook.Items = Nothing

索引= 1到CalendarCollection.Count

                   记录("循环的setlocation"+ index.ToString())

                   如果(CalendarCollection(index).EmailAddress = email)则为
                       记录("setlocation email"+ + email)

                        CalendarFolderItems = CalendarCollection(index).FolderItems - 受影响的计算机在此处收到错误

For index = 1 To CalendarCollection.Count
                    Log("setlocation for loop " + index.ToString())
                    If (CalendarCollection(index).EmailAddress = email) Then
                        Log("setlocation email " + email)
                        CalendarFolderItems = CalendarCollection(index).FolderItems -- effected machines are  getting error here

                   结束如果

                   End if

下一步

现在,我们已经尝试修复有效机器的展望但是它没有解决问题

Now, we already tried repairing outlook on effcted machine but it did not resolve issue

不确定但可能是由于注册表中的一些冲突?

Not sure but can it be due to some conflict in registry?

谢谢




推荐答案


这篇关于在outlook addin中读取收件人属性时操作失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 11:16