![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Since I can;t Post images here. Please refer to following url for Image.
http://accenture.dotnetjini.com/OutLookAddInError.jpg In Explorer DeActivate Event i am calling This.Application.ActiveExplorer(). It does not return null, but if i query its Selection Property it throws an exception. I am surprize to see that for other properties there is no exception generated. (as seen in image) Why is this behaviour, I don;t understand. is it because of poor outlook API? The Details of error is. System.Runtime.InteropServices.COMException occurred Message="The Explorer has been closed and cannot be used for further operations. Review your code and restart Outlook." Source="Microsoft Office Outlook" ErrorCode=-624820215 StackTrace: at Microsoft.Office.Interop.Outlook.ExplorerClass.get _Selection() at OutlookAddIn3.ThisAddIn.wrappedExplorer_ExplorerDe Activate(MailItem p_currentMailItem) in D:\2009Trainings\outlookTest\ThisAddIn.cs:line 242 InnerException: Please advice. Regards |
Ads |
#2
|
|||
|
|||
![]()
The state of ActiveExplorer() during Deactivate() is going to be
indeterminate. Why do you need the Selection collection then? Why not on Activate() and then handling selection changes in the SelectionChange() event? Or you can get a handle to that specific Explorer on Activate() and use that instead of ActiveExplorer(). -- 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 "JIGNESH" wrote in message ... Since I can;t Post images here. Please refer to following url for Image. http://accenture.dotnetjini.com/OutLookAddInError.jpg In Explorer DeActivate Event i am calling This.Application.ActiveExplorer(). It does not return null, but if i query its Selection Property it throws an exception. I am surprize to see that for other properties there is no exception generated. (as seen in image) Why is this behaviour, I don;t understand. is it because of poor outlook API? The Details of error is. System.Runtime.InteropServices.COMException occurred Message="The Explorer has been closed and cannot be used for further operations. Review your code and restart Outlook." Source="Microsoft Office Outlook" ErrorCode=-624820215 StackTrace: at Microsoft.Office.Interop.Outlook.ExplorerClass.get _Selection() at OutlookAddIn3.ThisAddIn.wrappedExplorer_ExplorerDe Activate(MailItem p_currentMailItem) in D:\2009Trainings\outlookTest\ThisAddIn.cs:line 242 InnerException: Please advice. Regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange email behaviour when I send | Pete Zahut | Outlook Express | 10 | April 16th 09 06:09 PM |
Strange behaviour in cached mode | John C | Outlook - General Queries | 0 | August 3rd 08 05:58 PM |
Strange behaviour with Type Error | Tobias Schröer | Outlook and VBA | 0 | January 31st 07 09:48 AM |
strange behaviour after IE7 upgrade | Tony Linguini | Outlook - General Queries | 0 | October 21st 06 03:17 AM |
Strange OE6 behaviour | Patrick E. King | Outlook Express | 2 | April 26th 06 06:59 AM |