|
| Author |
Message |
Andre Maas
Joined: 10 Oct 2007 Posts: 10
|
Posted: Wed Jan 30, 2008 8:43 pm Post subject: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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é
Archived from group: microsoft>public>outlook>program_addins |
|
| Back to top |
|
 |
Andre Maas
Joined: 10 Oct 2007 Posts: 10
|
Posted: Wed Jan 30, 2008 9:46 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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()
Andre Maas schrieb:
> 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é |
|
| Back to top |
|
 |
Ken Slovak - [MVP - Outlo
Joined: 12 Aug 2007 Posts: 405
|
Posted: Wed Jan 30, 2008 4:00 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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?
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Andre Maas" wrote in message
news:%23gS93c1YIHA.6044@TK2MSFTNGP05.phx.gbl...
> 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()
>
> Andre Maas schrieb:
>> 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é |
|
| Back to top |
|
 |
Andre Maas
Joined: 10 Oct 2007 Posts: 10
|
Posted: Thu Jan 31, 2008 1:54 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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é
Ken Slovak - [MVP - Outlook] schrieb:
> 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?
> |
|
| Back to top |
|
 |
Andre Maas
Joined: 10 Oct 2007 Posts: 10
|
Posted: Thu Jan 31, 2008 4:14 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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é
Andre Maas schrieb:
> 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é
>
>
>
> Ken Slovak - [MVP - Outlook] schrieb:
>> 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?
>> |
|
| Back to top |
|
 |
Andre Maas
Joined: 10 Oct 2007 Posts: 10
|
Posted: Thu Jan 31, 2008 4:48 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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é
Andre Maas schrieb:
> 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é
>
>
> Andre Maas schrieb:
>> 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é
>>
>>
>>
>> Ken Slovak - [MVP - Outlook] schrieb:
>>> 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?
>>> |
|
| Back to top |
|
 |
Ken Slovak - [MVP - Outlo
Joined: 12 Aug 2007 Posts: 405
|
Posted: Thu Jan 31, 2008 4:15 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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;
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Andre Maas" wrote in message $YIHA.4272@TK2MSFTNGP05.phx.gbl...
> 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é
>
>
> Andre Maas schrieb:
>> 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é |
|
| Back to top |
|
 |
Andre Maas
Joined: 10 Oct 2007 Posts: 10
|
Posted: Fri Feb 01, 2008 2:04 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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.
Ken Slovak - [MVP - Outlook] schrieb:
> 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;
> |
|
| Back to top |
|
 |
Andre Maas
Joined: 10 Oct 2007 Posts: 10
|
Posted: Fri Feb 01, 2008 9:58 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
Ken Slovak - [MVP - Outlook] schrieb:
> 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é |
|
| Back to top |
|
 |
Ken Slovak - [MVP - Outlo
Joined: 12 Aug 2007 Posts: 405
|
Posted: Fri Feb 01, 2008 7:01 pm Post subject: Re: System.Runtime.InteropServices.COMException (0x8002801D) |
|
|
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.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Andre Maas" wrote in message
news:%23Te5ItOZIHA.4684@TK2MSFTNGP06.phx.gbl...
> Ken Slovak - [MVP - Outlook] schrieb:
>> 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é
>
|
|
| Back to top |
|
 |
|