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): Bibliothek
nicht registriert. (Ausnahme von HRESULT: 0x8002801D
(TYPE_E_LIBNOTREGISTERED)) in
Microsoft.Office.Interop.Outlook._MailItem.get_PropertyAccessor()
in OutlookAddIn1.myClass.SelectionChanged()

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

WHAT library is it? I had repaired my VSTO2005 installation. But it take
no effekt.


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.

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


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é
 

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