S
SklHTkVTSA
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_ExplorerDeActivate(MailItem
p_currentMailItem) in D:\2009Trainings\outlookTest\ThisAddIn.cs:line 242
InnerException:
Please advice.
Regards
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_ExplorerDeActivate(MailItem
p_currentMailItem) in D:\2009Trainings\outlookTest\ThisAddIn.cs:line 242
InnerException:
Please advice.
Regards