Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   COM object that has been separated from its underlying RCW (http://www.outlookbanter.com/add-ins-outlook/88838-com-object-has-been-separated.html)

Nagaraj April 9th 09 01:37 PM

COM object that has been separated from its underlying RCW
 
Hi All,

I opened a mail in outlook 2007. Done some manipulations and closed it.
When I again open the same mail item I am getting the following error

COM object that has been separated from its underlying RCW cannot be used.

Can anybody help me resolving this issue?

Thanks in advance

--
Nagaraj Tadipatri

Ken Slovak - [MVP - Outlook] April 9th 09 02:29 PM

COM object that has been separated from its underlying RCW
 
You are most likely calling Marshal.ReleaseComObject() or it's finalize
cousin on that object, which releases the RCW for the object. Then you are
trying to re-use that object without re-instantiating it. Make sure not to
call one of the release methods if you still have any other references you
need to use for that object, or re-instantiate that object to create a new
RCW before using it again.

--
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


"Nagaraj" wrote in message
...
Hi All,

I opened a mail in outlook 2007. Done some manipulations and closed it.
When I again open the same mail item I am getting the following error

COM object that has been separated from its underlying RCW cannot be used.

Can anybody help me resolving this issue?

Thanks in advance

--
Nagaraj Tadipatri




All times are GMT +1. The time now is 12:32 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com