Strange Behaviour of Explorer Object.

  • Thread starter Thread starter SklHTkVTSA
  • Start date Start date
Status
Not open for further replies.
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
 
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().

"JIGNESH" <JIGNESH> wrote in message

news:0660A850-0AF9-41A0-91A0-0FB8FA94CA7C@microsoft.com...
> 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

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
B Strange MAPI/Exchange/IMAP behaviour in OL 2016 under10.0.19044.2006 Using Outlook 0
D.Moore Strange VBA error Outlook VBA and Custom Forms 4
P Strange Calendar Entries Using Outlook 4
ManaarZakaria I'm afraid of this issue, cause of strange error Exchange Server Administration 2
M Outlook.com autocomplete list invaded by strange items Using Outlook.com accounts in Outlook 7
A Outlook 2016 - adding outlook.com account creates a new/strange address Using Outlook.com accounts in Outlook 18
M Outlook adds strange characters inserted into the Subject Line Using Outlook 2
E Strange Send/Receive count Using Outlook 3
F Strange problem with calendars Using Outlook 3
dolke Strange Outlook behavior when receiving emails. More info in the content... Using Outlook 7
A Two strange calender problems in Outlook 2003 ... Using Outlook 2
S Outlook 2007 Add-in strange load behavior Outlook VBA and Custom Forms 10
B strange change in Outlook 2000 forms Outlook VBA and Custom Forms 1
E Strange save request when closing Outlook 2007 Outlook VBA and Custom Forms 4
E Strange save request when closing Outlook 2007 Outlook VBA and Custom Forms 4
L Outlook/O365 "sent on behalf" behaviour Exchange Server Administration 1
Ed Sheehan Unusual behaviour in setting Sender (Outlook 2016) Outlook VBA and Custom Forms 4
M Expected behaviour of recurring appointments? Using Outlook 2
Justo Horrillo It's possible to modify the behaviour of the conversation option? Using Outlook 2
R Outlook 2013 - Odd Sync behaviour Using Outlook 1
wallisellener BCM - Weird behaviour BCM (Business Contact Manager) 20
U Odd behaviour for auto-receive Using Outlook 2
J Using Group Policy to control Outlook security/attachments behaviour Outlook VBA and Custom Forms 1
T Outlook 2003 Categories behaviour Outlook VBA and Custom Forms 1
K Working with Explorer.Close event Outlook VBA and Custom Forms 3
R Quick Access view in File Explorer when saving attachments Using Outlook 0
R Sending emails via Outlook XP, from Windows 10 File Explorer Using Outlook 1
P Automate Outlook Start - No Active Explorer Object Found Using Outlook 10
K Macro Not Executing then send email from Explorer Outlook VBA and Custom Forms 3
I Windows 10 - .msg files on disk show Explorer popup error Using Outlook 5
M Question: Is there a rule that will save email in Windows Explorer Outlook VBA and Custom Forms 3
oliv- How to select an mailitem in explorer with "show as conversation" Outlook VBA and Custom Forms 8
Michael Chiasson PST file shows 300+MB in Windows Explorer, but only 250kb in Outlook 2010 Using Outlook 1
P Was Helvetica crashing Outlook, now fix has messed up explorer Using Outlook 4
R Outlook 2007 - drag drop email to Explorer Using Outlook 1
A vb6 run time error 5 when Outlook 2007 Explorer object displayed Outlook VBA and Custom Forms 1
C Create a Ribbon for the OL2010 Explorer Outlook VBA and Custom Forms 1
E Can I hide an explorer or make an explorer modal Outlook VBA and Custom Forms 2
E Can I hide an explorer or make an explorer modal Outlook VBA and Custom Forms 2
A Active explorer issue Outlook VBA and Custom Forms 15
S How to italicize the email entry in explorer window Outlook VBA and Custom Forms 3
T Creating toolbar in new Explorer Outlook VBA and Custom Forms 3
T Is Explorer.FolderSwitch the best event for hiding commandbarbutton? Outlook VBA and Custom Forms 5
R destroying Explorer object pointers on shutdown Outlook VBA and Custom Forms 2
U Not able to delete Add-in button from multiple Outlook Explorer Outlook VBA and Custom Forms 1

Similar threads

Back
Top