System.Runtime.InteropServices.COMException (0x8002801D)

A

Andre Maas

Hey,

if i called 'mailItem.PropertyAccessor.GetProperty()' in my code i get
an exception called "System.Runtime.InteropServices.COMException
(0x8002801D)" Library not installed.

mailItem is the selected mail from the SelectionChange Event in OL2007.

WHAT library is it? Some time ago it works. I had repaired my VSTO2005
installation. But it take ne effekt.


Thx
André
 
A

Andre Maas

Here some more infos:

System.Runtime.InteropServices.COMException (0x8002801D): Bibliothek
nicht registriert. (Ausnahme von HRESULT: 0x8002801D
(TYPE_E_LIBNOTREGISTERED)) in
Microsoft.Office.Interop.Outlook._MailItem.get_PropertyAccessor()
in OutlookAddIn1.myClass.SelectionChanged()
 
K

Ken Slovak - [MVP - Outlook]

Is your Outlook PIA reference to Outlook 2007? Do you get errors calling any
other method or property that's new to Outlook 2007 and wasn't there in
Outlook 2003?
 
A

Andre Maas

My PIA is referenced to OL2007.

I get NO errors calling any other methods. Getting the PropertyAccessor'
from an folder element there is no exception. ONLY getting the
'PropertyAccessor' from an MailItem throw an exception.

Is it possible that any Windows or Office Updates can be throw that
exception? I know that my code had been worked for a long time.

Thx
André
 
A

Andre Maas

Here some new infos:

if i start my addin out of my VS2005 it worked fine. If i start my addin
as 'standalone' with outlook it crashed.

Thx
André
 
A

Andre Maas

Hey,

some new infos (sorry):

if i get the PropertyAccessor from an Folder it works fine.
(Code below)

Folder folder = Application.Session.DefaultStore.GetRootFolder() as Folder;

if (folder != null)
exHelper._MailboxID =
folder.PropertyAccessor.GetProperty(MapiProp.MailBoxID).
ToString
();


BUT if i want to get the PropertyAccessor from an MailItem it crashed.
(Code below)

if (o is MailItem)
{
MailItem item = o as MailItem;
string strProp = item.PropertyAccessor.GetProperty(
MapiProp.xBaseMailID).ToString();


}


HELP needed...


Thx
André
 
K

Ken Slovak - [MVP - Outlook]

What do you mean by "if i start my addin out of my VS2005 it worked fine. If
i start my addin as 'standalone' with outlook it crashed."? How exactly are
you starting it?

Can you get a PropertyAccessor object from the mail item at all, not using
dot operators combining that with Get_Property()? For example:

Outlook.PropertyAccessor _accessor =
(Outlook.PropertyAccessor)o.PropertyAccessor;
 
A

Andre Maas

I mean, if i start my addin out of my VS2005 for debugging, as
sourcecode, i can get the PropertyAccessor. If i start the Addin as DLL
with OL2007 and NOT out of my VS2005 it crashed by getting the
PropteryAccessor.
 
K

Ken Slovak - [MVP - Outlook]

So, did you do that test I mentioned to see if you can just get
PropertyAccessor on a MailItem on a line that doesn't also call GetProperty?

In compiled code you can get folder.PropertyAccessor?

Are you positive that you have an actual MailItem and not Post or something
else?

I can't see any reason you could get PropertyAccessor from folder and not
from item.

Does the code fire any other exceptions other than when using
item.PropertyAccessor?
 
A

Andre Maas

Ken said:
So, did you do that test I mentioned to see if you can just get
PropertyAccessor on a MailItem on a line that doesn't also call
GetProperty?
I just get the PropertyAccessor on a Mail Item
In compiled code you can get folder.PropertyAccessor? Yes, right

Are you positive that you have an actual MailItem and not Post or
something else?
I really had MailItem and NOT Post oer something else.
I can't see any reason you could get PropertyAccessor from folder and
not from item. :-(

Does the code fire any other exceptions other than when using
item.PropertyAccessor?
No.


One think seems different to a 'normale' mailitem. Every MailItem which
throw an exception has anther MessageClass. It is not 'IPM.Note'. These
Mails have the MessageClass 'IPM.Reference' which i set for other
actions in my code.

Is it possible that an ExtendedMapiForm can be the 'bad guy'?



Thx
André
 
K

Ken Slovak - [MVP - Outlook]

I think you nailed it. Those IPM.Reference items probably don't have the
correct format or the property you want. If you can get to
item.PropertyAccessor then it's just a matter of the specific properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top